forked from samuel/go-zookeeper
-
Notifications
You must be signed in to change notification settings - Fork 0
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 flapping tests #4
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Known flapping tests:
|
335ac6e
to
30499fb
Compare
- use FLWRuok in a retry loop to determine if server was started or stopped - panic if server cannot be started or stopped; there's no reason to continue testing as at this point results are non-deterministic - modify test ServerStruct to hold state and its address As a side affect tests will now run slower but should be more consistent.
30499fb
to
1d4257f
Compare
0b6e907
to
8848dad
Compare
- fail test if listener can't be closed - pause during defer to give listener a chance to close
It looks like the logic in this test is incorrect. To be sure I've added some logging, but commented out the potentially flawed test logic. Will need to keep an eye on it.
8848dad
to
6f42e87
Compare
cfdba11
to
f03475c
Compare
- more logging - fix error handling
73ec936
to
ea8a1e8
Compare
Ran the following locally, no errors: touch test.log
for i in {1..20}
do
echo "running test $i"
go test -v -race -coverprofile=profile.cov ./zk >& test${i}.log
if [ "$?" -ne 0 ]; then
echo "test $i failed"
fi
echo "test $i finished"
done |
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
For server cluster setup fix, some ideas were drawn from samuel#76 (However, that solution was not complete and required additional refactoring.)