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 test cases #94

Merged
merged 16 commits into from
Sep 6, 2018
Merged

Fix test cases #94

merged 16 commits into from
Sep 6, 2018

Conversation

arjan
Copy link
Collaborator

@arjan arjan commented Jul 24, 2018

This has become quite a large commit. I started from #74 to see if I could fix all the test cases. So basically this commit introduces a few things:

  • mix format the codebase (was not really needed, but makes it easier for contributions in the future)
  • Fix various existing test cases by sometimes adding longer timeouts, restarting the :swarm application inbetween tests, clearing the registry, adjusting the node blacklist, etc.
  • Some test cases still randomly failed (most notably quorum_test.exs; after tracing it down to the usage of the Clock CRDT, I merged Fixed handling of interval tree clocks #85 into this branch, which fixed the remaining tests.
  • Clean up the test output; added SWARM_DEBUG=true environment variable to see all verbose messages (documented in the README).
  • Remove use of --seed 0 argument, to ensure tests can be executed independently of each other.

I can imagine this is a big PR to review but I did not touch any logic code except for merging in the #85 branch. (well, except e793c78, but those changes were overwritten by the #85 merge anyway)

Eventually, a lot of (clustering) boilerplate could be lifted out of the test code but I noticed you're already working on that ;-)

README.md Outdated
@@ -324,6 +324,17 @@ end

MIT

## Testing

`mix test` runs a variety of tests, most of the use a cluster of
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's a minor typo: (...) most of them (...).

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

@beardedeagle
Copy link
Collaborator

Any movement on this @bitwalker?

@bitwalker
Copy link
Owner

Looks like this conflicts with #85 - is this intended to replace that PR? I can undo the merge and merge this instead if it supercedes it - otherwise please rebase :)

This was referenced Aug 25, 2018
@arjan
Copy link
Collaborator Author

arjan commented Aug 28, 2018

This is indeed intended to replace #85. I see that it has conflicts now, I'll fix those next week, I'm on holiday currently.

@arjan
Copy link
Collaborator Author

arjan commented Aug 28, 2018

Seems most conflicts are related to formatting.

@bitwalker
Copy link
Owner

@arjan I did the merge for you, can you verify when you get a chance? I'm pretty sure it was all formatting related, but there were larger changes in one of the test files, and I chose to just favor the changes in this PR rather than try to parse through what all of the changes were, since formatting was mixed in there.

Speaking of which, please don't make formatting changes as part of PRs like this, I'm totally fine with those being made in their own PR, or alongside small changes, because they can basically be merged straight away, but it makes large changes harder to review when mixed together, and in cases like this, can result in somewhat painful merges. No worries this time though :)

Copy link
Collaborator Author

@arjan arjan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Merge looks good. Can't approve though it as it's my own PR :-)

mix.exs Outdated Show resolved Hide resolved
@bitwalker bitwalker merged commit d7b4088 into bitwalker:master Sep 6, 2018
@bitwalker
Copy link
Owner

Thanks so much!

@arjan arjan mentioned this pull request Sep 16, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants