summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJohn Christopher Anderson <jchris@apache.org>2010-03-04 03:10:19 +0000
committerJohn Christopher Anderson <jchris@apache.org>2010-03-04 03:10:19 +0000
commitd318717866ffa267781ab482e99a05415e2ac0e4 (patch)
tree207409d78eacca8e206deb05b99689ec449722a4 /test
parent3a3a9c1efab1c9fe4cd5ebb6c80da4005eb0806b (diff)
reverting damien's latest commit until we can figure out why it's causing failures
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@918834 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'test')
-rwxr-xr-xtest/etap/010-file-basics.t13
-rwxr-xr-xtest/etap/040-util.t23
2 files changed, 23 insertions, 13 deletions
diff --git a/test/etap/010-file-basics.t b/test/etap/010-file-basics.t
index 595d87e9..09b2f2b1 100755
--- a/test/etap/010-file-basics.t
+++ b/test/etap/010-file-basics.t
@@ -67,19 +67,6 @@ test() ->
{ok, BinPos} = couch_file:append_binary(Fd, <<131,100,0,3,102,111,111>>),
etap:is({ok, foo}, couch_file:pread_term(Fd, BinPos),
"Reading a term from a written binary term representation succeeds."),
-
- BigBin = list_to_binary(lists:duplicate(100000, 0)),
- {ok, BigBinPos} = couch_file:append_binary(Fd, BigBin),
- etap:is({ok, BigBin}, couch_file:pread_binary(Fd, BigBinPos),
- "Reading a large term from a written representation succeeds."),
-
- ok = couch_file:write_header(Fd, hello),
- etap:is({ok, hello}, couch_file:read_header(Fd),
- "Reading a header succeeds."),
-
- {ok, BigBinPos2} = couch_file:append_binary(Fd, BigBin),
- etap:is({ok, BigBin}, couch_file:pread_binary(Fd, BigBinPos2),
- "Reading a large term from a written representation succeeds 2."),
% append_binary == append_iolist?
% Possible bug in pread_iolist or iolist() -> append_binary
diff --git a/test/etap/040-util.t b/test/etap/040-util.t
index 9c8f3d5a..4500d38a 100755
--- a/test/etap/040-util.t
+++ b/test/etap/040-util.t
@@ -35,6 +35,29 @@ test() ->
etap:is(foobarbaz, couch_util:to_existing_atom("foobarbaz"),
"A list of atoms is one munged atom."),
+ % terminate_linked
+ Self = self(),
+
+ spawn(fun() ->
+ SecondSelf = self(),
+ ChildPid = spawn_link(fun() ->
+ SecondSelf ! {child, started},
+ receive shutdown -> ok end
+ end),
+ PidUp = receive
+ {child, started} -> ok
+ after 1000 ->
+ {error, timeout}
+ end,
+ etap:is(ok, PidUp, "Started a linked process."),
+ couch_util:terminate_linked(normal),
+ Self ! {pid, ChildPid}
+ end),
+ receive
+ {pid, Pid} ->
+ etap:ok(not is_process_alive(Pid), "Linked process was killed.")
+ end,
+
% implode
etap:is([1, 38, 2, 38, 3], couch_util:implode([1,2,3],"&"),
"use & as separator in list."),