modkit icon indicating copy to clipboard operation
modkit copied to clipboard

Test failure due to concurrency issue

Open Flamefire opened this issue 2 months ago • 2 comments

test_pileup_with_header and test_pileup_no_filt write to the same file:

https://github.com/nanoporetech/modkit/blob/8fa79e3e55c5735637f9ea3115c3e621b58fd74c/tests/test_pileup.rs#L24 https://github.com/nanoporetech/modkit/blob/8fa79e3e55c5735637f9ea3115c3e621b58fd74c/tests/test_pileup.rs#L901

Same here: https://github.com/nanoporetech/modkit/blob/8fa79e3e55c5735637f9ea3115c3e621b58fd74c/modkit/tests/test_pileup.rs#L922

This leads to test failures when tests are run in parallel.

Workaround: cargo test --profile=release -- --test-threads=1

Flamefire avatar Oct 14 '25 10:10 Flamefire

@Flamefire

Thanks for noticing that, this is pretty easy to fix. If I push something to master would that help or do you need a full release?

ArtRand avatar Oct 15 '25 01:10 ArtRand

We have a workaround for now using the single-thread approach. Going forward, a full release would be good. Looks like 0.5.1 is due and this fix is so trivial I believe it can still be included

Background: We build software for HPC clusters and only use tagged versions for that. So when updating we'd need the tag or keep the workaround.

Flamefire avatar Oct 15 '25 06:10 Flamefire