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

tests which assert or panic in other threads now will report an error #19532

Merged
merged 2 commits into from
Sep 2, 2021

Conversation

jeffwashington
Copy link
Contributor

@jeffwashington jeffwashington commented Aug 31, 2021

Problem

Tests calling this function have a tendency to fail in a thread. The result is the test hangs and we get no report of an error.

Summary of Changes

Only wait for the test to finish for 100s. If it takes longer than that, then join the other threads so we can get the failure message.
Fixes #

@jeffwashington jeffwashington requested a review from carllin August 31, 2021 20:41
@jeffwashington jeffwashington marked this pull request as ready for review September 1, 2021 18:48
@@ -12976,12 +12976,17 @@ pub(crate) mod tests {
// Let threads run for a while, check the scans didn't see any mixed slots
let min_expected_number_of_scans = 5;
std::thread::sleep(Duration::new(5, 0));
let mut loops = 1000;
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: loops -> remaining_loops

carllin
carllin previously approved these changes Sep 2, 2021
@mergify mergify bot dismissed carllin’s stale review September 2, 2021 00:06

Pull request has been modified.

@codecov
Copy link

codecov bot commented Sep 2, 2021

Codecov Report

Merging #19532 (830eea8) into master (e193968) will increase coverage by 0.0%.
The diff coverage is 100.0%.

@@           Coverage Diff           @@
##           master   #19532   +/-   ##
=======================================
  Coverage    82.7%    82.7%           
=======================================
  Files         462      462           
  Lines      131268   131272    +4     
=======================================
+ Hits       108600   108624   +24     
+ Misses      22668    22648   -20     

@jeffwashington jeffwashington merged commit f5388cf into solana-labs:master Sep 2, 2021
frits-metalogix added a commit to identity-com/solana that referenced this pull request Nov 24, 2021
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.

2 participants