You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sometimes, the couch_log_config_listener_test test couch_log_config_test_ fails. It should always pass
Makefile output:
module 'couch_log_config_listener_test'
couch_log_config_listener_test: couch_log_config_test_...*failed*
in function couch_log_config_listener_test:'-check_restart_listener/0-fun-2-'/1 (test/couch_log_config_listener_test.erl, line 38)
in call from couch_log_config_listener_test:check_restart_listener/0 (test/couch_log_config_listener_test.erl, line 38)
**error:{assertEqual_failed,[{module,couch_log_config_listener_test},
{line,38},
{expression,"get_handler ( )"},
{expected,not_found},
{value,{config_listener,{couch_log_sup,<0.3334.0>}}}]}
couch_log_config_listener_test: couch_log_config_test_...[1.002 s] ok
[done in 1.008 s]
couch.log from the uploader is EMPTY.
Possible Solution
Looks like this test is expecting gen_event:delete_handler to occur immediately. Should there be a timer:sleep() call prior to checking get_handler()?
Just a note: it turned out there could be two causes for this failure 1) we are indeed checking event manager before it had chance to remove old handler 2) couch_log_sup is super fast and spawns and register new handler before we are pulling which_handlers/1, so we are getting new handler. Just sleep would help in half of the cases, so I ended with something a bit more verbose. Hope it'll work more reliably.
Current & Expected Behaviour
Sometimes, the
couch_log_config_listener_test
testcouch_log_config_test
_ fails. It should always passMakefile output:
couch.log from the uploader is EMPTY.
Possible Solution
Looks like this test is expecting
gen_event:delete_handler
to occur immediately. Should there be atimer:sleep()
call prior to checkingget_handler()
?Context
This used to be known as https://issues.apache.org/jira/browse/COUCHDB-3341 but is now on GH Issues.
The text was updated successfully, but these errors were encountered: