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

Race in AggSigDB unit test #2546

Closed
corverroos opened this issue Aug 15, 2023 · 1 comment
Closed

Race in AggSigDB unit test #2546

corverroos opened this issue Aug 15, 2023 · 1 comment
Labels
bug Something isn't working protocol Protocol Team tickets

Comments

@corverroos
Copy link
Contributor

🐞 Bug Report

Description

AggSigDB test TestDutyExpiration has a race condition which causes builds and PRs to fail, see. The test has been disabled.

Fix the race and enable the test.

@0xAleksaOpacic
Copy link
Contributor

0xAleksaOpacic commented Aug 23, 2023

Hey, nice to meet you all! 👋
I've been going through your repo and really like the work you've put into it.

I've identified the root cause of the race condition in the TestDutyExpiration. And open PR with a fix:
#2561. Looking forward to your feedback 🚀

obol-bulldozer bot pushed a commit that referenced this issue Aug 25, 2023
This PR addresses a detected race condition in TestDutyExpiration tests. The issue arose from simultaneous read/write operations on the db.keysByDuty map. Instead of relying on timeouts, which proved unreliable, I switched to using a sync.WaitGroup to ensure effective coordination. 
Along with the race condition fix, this PR also enhances the test suite's performance by introducing t.Parallel() at the beginning of tests to allow for parallel execution of tests within the package.

category: bug
ticket: #2546
@boulder225 boulder225 added the bug Something isn't working label Oct 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working protocol Protocol Team tickets
Projects
None yet
Development

No branches or pull requests

3 participants