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

Rework test_run_local_simultaneous_runs to be more reliable #441

Merged
merged 1 commit into from
Feb 15, 2018

Conversation

njsmith
Copy link
Member

@njsmith njsmith commented Feb 15, 2018

We used to use a single queue to send messages to and from the
threads, which of course is unreliable because the main thread could
end up reading back its own message. In particular, on PyPy this
happened regularly, and occasionally it meant that the test
deadlocked. So this fixed gh-379.

This patch also updates the test harness to actually pull errors back
from the child threads, so that if the test does fail then we can
detect it.

We used to use a single queue to send messages to and from the
threads, which of course is unreliable because the main thread could
end up reading back its own message. In particular, on PyPy this
happened regularly, and occasionally it meant that the test
deadlocked. So this fixed python-triogh-379.

This patch also updates the test harness to actually pull errors back
from the child threads, so that if the test does fail then we can
detect it.
@codecov
Copy link

codecov bot commented Feb 15, 2018

Codecov Report

Merging #441 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master    #441      +/-   ##
=========================================
+ Coverage    99.2%   99.2%   +<.01%     
=========================================
  Files          89      89              
  Lines       10338   10345       +7     
  Branches      720     720              
=========================================
+ Hits        10256   10263       +7     
  Misses         61      61              
  Partials       21      21
Impacted Files Coverage Δ
trio/_core/tests/test_local.py 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a72e471...8c7ccaf. Read the comment docs.

@pquentin
Copy link
Member

This makes a lot of sense, thanks!

@pquentin pquentin merged commit 623983b into python-trio:master Feb 15, 2018
@njsmith njsmith deleted the fix-379 branch February 15, 2018 13:09
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.

Intermittent CI failures in test_local.py on PyPy
2 participants