summaryrefslogtreecommitdiff
path: root/test/etap/090-task-status.t
diff options
context:
space:
mode:
authorPaul Joseph Davis <davisp@apache.org>2009-06-25 04:57:42 +0000
committerPaul Joseph Davis <davisp@apache.org>2009-06-25 04:57:42 +0000
commita85d922d4078b5a54c391759e79e9da6b0fb316f (patch)
tree2d77f5451c7d89ec01dd71f0dc628a8358887689 /test/etap/090-task-status.t
parent25d76bffa027c3d736791949c3b1355709b9531c (diff)
Cleaning out tabs from source code. Purely whitespace diff.
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@788258 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'test/etap/090-task-status.t')
-rwxr-xr-xtest/etap/090-task-status.t76
1 files changed, 38 insertions, 38 deletions
diff --git a/test/etap/090-task-status.t b/test/etap/090-task-status.t
index d2df4f91..45d38dff 100755
--- a/test/etap/090-task-status.t
+++ b/test/etap/090-task-status.t
@@ -17,33 +17,33 @@ check_status(Pid,ListPropLists) ->
From = list_to_binary(pid_to_list(Pid)),
Element = lists:foldl(
fun(PropList,Acc) ->
- case proplists:get_value(pid,PropList) of
- From ->
+ case proplists:get_value(pid,PropList) of
+ From ->
[PropList | Acc];
- _ ->
+ _ ->
[]
- end
- end,
+ end
+ end,
[], ListPropLists
),
proplists:get_value(status,hd(Element)).
loop() ->
receive
- {add, From} ->
- Resp = couch_task_status:add_task("type", "task", "init"),
- From ! {ok, self(), Resp},
- loop();
- {update, Status, From} ->
- Resp = couch_task_status:update(Status),
- From ! {ok, self(), Resp},
- loop();
- {update_frequency, Msecs, From} ->
- Resp = couch_task_status:set_update_frequency(Msecs),
- From ! {ok, self(), Resp},
- loop();
- {done, From} ->
- From ! {ok, self(), ok}
+ {add, From} ->
+ Resp = couch_task_status:add_task("type", "task", "init"),
+ From ! {ok, self(), Resp},
+ loop();
+ {update, Status, From} ->
+ Resp = couch_task_status:update(Status),
+ From ! {ok, self(), Resp},
+ loop();
+ {update_frequency, Msecs, From} ->
+ Resp = couch_task_status:set_update_frequency(Msecs),
+ From ! {ok, self(), Resp},
+ loop();
+ {done, From} ->
+ From ! {ok, self(), ok}
end.
call(Pid, Command) ->
@@ -86,15 +86,15 @@ test() ->
etap:is(
check_status(Pid1, couch_task_status:all()),
<<"init">>,
- "Task status was set to 'init'."
+ "Task status was set to 'init'."
),
call(Pid1,update,"running"),
etap:is(
check_status(Pid1,couch_task_status:all()),
<<"running">>,
- "Status updated to 'running'."
- ),
+ "Status updated to 'running'."
+ ),
call(Pid2,add),
@@ -107,15 +107,15 @@ test() ->
etap:is(
check_status(Pid2, couch_task_status:all()),
<<"init">>,
- "Second tasks's status was set to 'init'."
- ),
-
+ "Second tasks's status was set to 'init'."
+ ),
+
call(Pid2, update, "running"),
etap:is(
check_status(Pid2, couch_task_status:all()),
<<"running">>,
- "Second task's status updated to 'running'."
- ),
+ "Second task's status updated to 'running'."
+ ),
call(Pid3, add),
@@ -128,15 +128,15 @@ test() ->
etap:is(
check_status(Pid3, couch_task_status:all()),
<<"init">>,
- "Third tasks's status was set to 'init'."
- ),
-
+ "Third tasks's status was set to 'init'."
+ ),
+
call(Pid3, update, "running"),
etap:is(
check_status(Pid3, couch_task_status:all()),
<<"running">>,
- "Third task's status updated to 'running'."
- ),
+ "Third task's status updated to 'running'."
+ ),
call(Pid3, update_frequency, 500),
@@ -144,23 +144,23 @@ test() ->
etap:is(
check_status(Pid3, couch_task_status:all()),
<<"still running">>,
- "Third task's status updated to 'still running'."
- ),
+ "Third task's status updated to 'still running'."
+ ),
call(Pid3, update, "skip this update"),
etap:is(
check_status(Pid3, couch_task_status:all()),
<<"still running">>,
- "Status update dropped because of frequency limit."
- ),
+ "Status update dropped because of frequency limit."
+ ),
call(Pid3, update_frequency, 0),
call(Pid3, update, "don't skip"),
etap:is(
check_status(Pid3, couch_task_status:all()),
<<"don't skip">>,
- "Status updated after reseting frequency limit."
- ),
+ "Status updated after reseting frequency limit."
+ ),
call(Pid1, done),