Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
After fix of
fake_db
functionmem3_shards
stopped silently failing and exposed race condition inmem3_shards_changes_test_
test. What was going on, the changes listener started in the test's setup was crashing when tried to register on unstartedcouch_event
server, so the test was either fast enough to do assertions before of that or failed on a dead listener process.This fix removing dependency on mocking all modules involved and just uses standard test_util's start and stop couch. Module's start moved into the test body to avoid masking a potential failure in setup.
Also the tests
mem3_sync_security_test
andmem3_util_test
been modified to avoid setup and teardown side effects.Testing recommendations
Minimal run
make eunit apps=mem3 suites=mem3_sync_security_test,mem3_util_test,mem3_shards
should pass, along with complete mem3 test suite test.Related Issues or Pull Requests
Closes #1282
Checklist