Defensive programming around test case race condition to address #776 #790

Merged
merged 1 commit into from May 16, 2017

Conversation

Projects
None yet
4 participants
Contributor

d-cameron commented Jan 20, 2017

Description

AsyncBufferedIteratorTest.testBackgroundBlocks() is subject to a race condition as it is a testing the async loading of records in AsyncBufferedIterator, but is not privy to the internal state of the iterator. Additional logic has been added such that the test case race condition is now extremely unlikely to be encountered.

@d-cameron d-cameron Defensive programming around test case race condition to address #776
c4ba257

Current coverage is 64.544% (diff: 100%)

Merging #790 into master will not change coverage

@@             master       #790   diff @@
==========================================
  Files           523        523          
  Lines         31614      31614          
  Methods           0          0          
  Messages          0          0          
  Branches       6769       6769          
==========================================
  Hits          20405      20405          
  Misses         9063       9063          
  Partials       2146       2146          

Sunburst

Powered by Codecov. Last update 19bd848...c4ba257

Contributor

d-cameron commented Jan 22, 2017 edited

@lbergelson do you think the codecov failure here due to the non-deterministic nature of the test case as it is now, or is there something else I'm missing?

Contributor

lbergelson commented Jan 23, 2017

@d-cameron I'm honestly not quite sure what's going on with that. We've been seeing it a lot. I've been attributing it to the pull request not being rebased on the head of master, but yours is. It shows you gaining a few lines in AsyncBlockCompressedInputStream and losing Md5CalculatingOutputStream.java. Both seem plausibly caused by test non-determinism.

I'll just disable that check since we're basically treating it as a false positive and I'm not sure it would ever have added value over the total project coverage test.

lbergelson was assigned by droazen Jan 24, 2017

Contributor

d-cameron commented Feb 2, 2017

Is there any way to retrigger the coverage checks? As it stand, it's causing the PR to incorrectly appear as if it's not suitable for merging yet.

Contributor

lbergelson commented Mar 7, 2017

@d-cameron Sorry, I keep meaning to reply to this and then getting distracted. Could we change this to use a CountDownLatch instead of the extended sleep and check? It would be cleaner and avoid any sleeping.

Contributor

yfarjoun commented May 16, 2017

I think that this PR is fine as is. 👍

@yfarjoun yfarjoun merged commit e1cf07e into samtools:master May 16, 2017

3 of 4 checks passed

codecov/changes 1 file has unexpected coverage changes not visible in diff.
Details
codecov/patch Coverage not affected when comparing 19bd848...c4ba257
Details
codecov/project 64.544% (+0.000%) compared to 19bd848
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment