-
Notifications
You must be signed in to change notification settings - Fork 1k
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 beacon-chain/sync Test Race #390
Fix beacon-chain/sync Test Race #390
Conversation
Codecov Report
@@ Coverage Diff @@
## master #390 +/- ##
==========================================
- Coverage 52.91% 52.69% -0.23%
==========================================
Files 33 33
Lines 2695 2695
==========================================
- Hits 1426 1420 -6
- Misses 1098 1105 +7
+ Partials 171 170 -1
Continue to review full report at Codecov.
|
Thanks for this! Does this solve all of the race condition issues or just one? If it solves all, can you add |
@prestonvanloon just one, there are currently 4 race conditions on master:
This PR solves The rest of the issues come from the While this is not solved we could add the |
OK, this is great progress nonetheless. I recommend adding a race testing exclusion on those targets for now: race = "off", # TODO(#377): fix issues with race detection testing. And adding |
SlotNumber: uint64(20), | ||
CrystallizedStateHash: crystallizedStateHash[:], | ||
} | ||
getBlockResponseMsg := func(slotNumber uint64) p2p.Message { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is neat!
@prestonvanloon done, PTAL. The racy tests are added to specific I've added the |
just pushed changes to disable race detector on |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rather than lumping all of the package tests into one test, racy_test.go.
What do you think about having multiple so it’s easy to know where they go after the problem has been solved?
service_norace_test.go
discovery_norace_test.go
Etc
@prestonvanloon great suggestion, done PTAL. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
I have ready changes for preventing the |
cc5559d
to
ee29d53
Compare
@fgimenez In another PR please. I'll merge this now |
With the removal of |
Towards #377
Running the tests with
--features=race
I was getting:There was a problem with reusing
msg1
in the test and changing members while the initialization goroutine was still active. It is fixed by generating different block response messages for each assertion.