Skip to content

Speed up BCF2 and SeekableStream integration tests#1770

Open
tfenne wants to merge 1 commit intodevfrom
tf_fixup_some_slow_tests
Open

Speed up BCF2 and SeekableStream integration tests#1770
tfenne wants to merge 1 commit intodevfrom
tf_fixup_some_slow_tests

Conversation

@tfenne
Copy link
Copy Markdown
Member

@tfenne tfenne commented Apr 12, 2026

The test suite run time is dominated by a handful of classes whose combined method/test runtime are >> 1 minute each. I'm tackling the CRAM tests that offend, which is most of them, on my cram branch. But these two also stick out.

BCF2EncoderDecoderUnitTest (106s → <1s):
Reduce the forCombinations list from 17 to 9 values (one representative
per BCF2 type plus one null per non-CHAR type). This cuts the 3-way
cartesian product from 17^3=4913 to 9^3=729 test sequences while still
covering all type combinations and null handling. Total tests: 13848 → 1588.

SeekableStreamGZIPinputStreamIntegrationTest (82s → 4s):
Reduce from 1M to 100K VCF records per test file (sufficient to exercise
multi-block BGZF boundaries) and from 10 to 5 first-record-length
variants. Total tests: 20 → 10.

Full suite: 21,909 tests pass in 2m12s (was ~5m with 34,189 tests).

Things to think about before submitting:

  • Make sure your changes compile and new tests pass locally.
  • Add new tests or update existing ones:
    • A bug fix should include a test that previously would have failed and passes now.
    • New features should come with new tests that exercise and validate the new functionality.
  • Extended the README / documentation, if necessary
  • Check your code style.
  • Write a clear commit title and message
    • The commit message should describe what changed and is targeted at htsjdk developers
    • Breaking changes should be mentioned in the commit message.

BCF2EncoderDecoderUnitTest (106s → <1s):
  Reduce the forCombinations list from 17 to 9 values (one representative
  per BCF2 type plus one null per non-CHAR type). This cuts the 3-way
  cartesian product from 17^3=4913 to 9^3=729 test sequences while still
  covering all type combinations and null handling. Total tests: 13848 → 1588.

SeekableStreamGZIPinputStreamIntegrationTest (82s → 4s):
  Reduce from 1M to 100K VCF records per test file (sufficient to exercise
  multi-block BGZF boundaries) and from 10 to 5 first-record-length
  variants. Total tests: 20 → 10.

Full suite: 21,909 tests pass in 2m12s (was ~5m with 34,189 tests).
@tfenne tfenne requested a review from yfarjoun April 12, 2026 18:31
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.

1 participant