Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix should_add_user_to_db_admins test suite #1236

Closed
eiri opened this issue Mar 26, 2018 · 1 comment
Closed

Fix should_add_user_to_db_admins test suite #1236

eiri opened this issue Mar 26, 2018 · 1 comment
Assignees

Comments

@eiri
Copy link
Member

eiri commented Mar 26, 2018

Test should_add_user_to_db_admins is horribly unreliable. Current master from travis:

in function couch_peruser_test:'-should_add_user_to_db_admins/1-fun-0-'/0 (test/couch_peruser_test.erl, line 321)
**error:{assertEqual,[{module,couch_peruser_test},
              {line,321},
              {expression,"proplists : get_value ( << \"admins\" >> , get_security ( UserDbName ) )"},
              {expected,{[{<<"names">>,[<<"qux">>]}]}},
              {value,undefined}]}
  output:<<"">>

Expected Behavior

Test shouldn't break on a whim for unrelated changes

Current Behavior

There are obvious race in that test and it is plaguing us for longer than half-year, if one can trust search on closed PRs claiming to fix it.

Possible Solution

Find and fix that annoying race.

Steps to Reproduce (for bugs)

Dunno, it's a race. Run suite enough times to catch it? Insert timers in random parts to induce it?

@eiri eiri self-assigned this Mar 26, 2018
@eiri
Copy link
Member Author

eiri commented Mar 26, 2018

On reproduction: timer:sleep(200) in ensure_security/3 works just perfect, so even slight fabric delay on getting that security object leads to an empty (but still 200 OK) response and the test's falure.

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

No branches or pull requests

1 participant