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

Fix flakiness in test_subprocess::test_basic #1546

Merged

Conversation

njsmith
Copy link
Member

@njsmith njsmith commented May 23, 2020

gh-1514 introduced a race condition in this test: now if the process
runs quickly enough, the returncode might have magically become
non-None before we check it.

Example failure: https://travis-ci.org/github/python-trio/trio/jobs/690291915

There are other tests that check the 'p.returncode is None' case (e.g.
test_auto_update_returncode), so we can just delete this.

python-triogh-1514 introduced a race condition in this test: now if the process
runs quickly enough, the returncode might have magically become
non-None before we check it.

Example failure: https://travis-ci.org/github/python-trio/trio/jobs/690291915

There are other tests that check the 'p.returncode is None' case (e.g.
test_auto_update_returncode), so we can just delete this.
@njsmith njsmith mentioned this pull request May 23, 2020
@codecov
Copy link

codecov bot commented May 23, 2020

Codecov Report

Merging #1546 into master will decrease coverage by 0.00%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master    #1546      +/-   ##
==========================================
- Coverage   99.67%   99.67%   -0.01%     
==========================================
  Files         108      108              
  Lines       13358    13357       -1     
  Branches     1012     1012              
==========================================
- Hits        13315    13314       -1     
  Misses         28       28              
  Partials       15       15              
Impacted Files Coverage Δ
trio/tests/test_subprocess.py 100.00% <ø> (ø)

@njsmith
Copy link
Member Author

njsmith commented May 23, 2020

...and according to some universal law of irony, github actions appears to have flaked out and decided not to test this PR at all. Maybe opening/closing will help?

@njsmith njsmith closed this May 23, 2020
@njsmith njsmith reopened this May 23, 2020
@oremanj oremanj merged commit 9578b92 into python-trio:master May 23, 2020
@njsmith njsmith deleted the race-condition-in-subprocess-test-basic branch May 23, 2020 09:23
njsmith added a commit to njsmith/trio that referenced this pull request May 23, 2020
In python-triogh-1546 I fixed the flakiness due to the returncode changing when
the process exits, but I missed that the repr also changes...
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