Skip to content

Instantly share code, notes, and snippets.

@KlausTrainer
Last active September 28, 2015 10:34
Show Gist options
  • Save KlausTrainer/34d3b6bd0726feb5f908 to your computer and use it in GitHub Desktop.
Save KlausTrainer/34d3b6bd0726feb5f908 to your computer and use it in GitHub Desktop.
couch_task_status_test
==> couch_log (eunit)
Running test function(s):
======================== EUnit ========================
There were no tests to run.
==> couch (eunit)
Running test function(s):
couch_task_status_tests:couch_task_status_test_/0
======================== EUnit ========================
CouchDB task status updates
couch_task_status_tests:58: should_register_task...ok
couch_task_status_tests:62: should_set_task_startup_time...[0.001 s] ok
couch_task_status_tests:67: should_have_update_time_as_startup_before_any_progress...ok
couch_task_status_tests:71: should_set_task_type...ok
couch_task_status_tests:75: should_not_register_multiple_tasks_for_same_pid...ok
couch_task_status_tests:80: should_set_task_progress...ok
couch_task_status_tests:85: should_update_task_progress...*skipped*
undefined
*unexpected termination of test process*
::{{badmatch,undefined},
[{couch_log,debug,2,[{file,"src/couch_log.erl"},{line,32}]},
{couch_task_status,handle_cast,2,
[{file,"src/couch_task_status.erl"},{line,137}]},
{gen_server,try_dispatch,4,[{file,"gen_server.erl"},{line,615}]},
{gen_server,handle_msg,5,[{file,"gen_server.erl"},{line,681}]},
{proc_lib,init_p_do_apply,3,[{file,[...]},{line,...}]}]}
=======================================================
Failed: 0. Skipped: 0. Passed: 6.
One or more tests were cancelled.
=ERROR REPORT==== 28-Sep-2015::12:10:40 ===
** Generic server couch_task_status terminating
** Last message in was {'$gen_cast',
{update_status,<0.132.0>,
[{progress,25},
{started_on,1443435040},
{type,replication},
{updated_on,1443435040}]}}
** When Server state == nil
** Reason for termination ==
** {{badmatch,undefined},
[{couch_log,debug,2,[{file,"src/couch_log.erl"},{line,32}]},
{couch_task_status,handle_cast,2,
[{file,"src/couch_task_status.erl"},{line,137}]},
{gen_server,try_dispatch,4,[{file,"gen_server.erl"},{line,615}]},
{gen_server,handle_msg,5,[{file,"gen_server.erl"},{line,681}]},
{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,240}]}]}
ERROR: One or more eunit tests failed.
ERROR: eunit failed while processing /home/klausi/dev/couchdb/src/couch: rebar_abort
@KlausTrainer
Copy link
Author

Here's how to run the test separately:

rebar setup_eunit && BUILDDIR=$(pwd) rebar -r eunit apps=couch tests="couch_task_status_test"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment