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

internal: avoid race access to config.Version by tests #3149

Merged
merged 1 commit into from
Oct 10, 2023

Conversation

AnnaShaleva
Copy link
Member

Network server constructor reads config.Version variable, and testcli.DeployContract writes dummy config.Version which causes race in tests. Avoid this race by moving config.Version initialisation to a separate package and perform it inside test packages init().

Close #3011, close #3017.

@AnnaShaleva AnnaShaleva added bug Something isn't working test Unit tests labels Oct 9, 2023
@codecov
Copy link

codecov bot commented Oct 9, 2023

Codecov Report

Merging #3149 (eeb439f) into master (91c928e) will increase coverage by 0.06%.
Report is 6 commits behind head on master.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master    #3149      +/-   ##
==========================================
+ Coverage   84.84%   84.91%   +0.06%     
==========================================
  Files         330      330              
  Lines       44332    44337       +5     
==========================================
+ Hits        37615    37648      +33     
+ Misses       5204     5172      -32     
- Partials     1513     1517       +4     

see 9 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Network server constructor reads config.Version variable, and
testcli.DeployContract writes dummy config.Version which causes
race in tests. Avoid this race by moving config.Version initialisation
to a separate package and perform it inside test packages init().

Close #3011, close #3017.

Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
@roman-khimov roman-khimov merged commit 19c59c3 into master Oct 10, 2023
15 of 18 checks passed
@roman-khimov roman-khimov deleted the fix-compiler-version-race branch October 10, 2023 09:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working test Unit tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Race in TestDeployBigContract Race in TestNEP11Import
2 participants