Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,10 @@ private static String generateRandomString(final int length) {
@DataProvider
public Iterator<Object[]> compressedVcfsToTest() throws Exception {
final List<Object[]> data = new ArrayList<>();
final int nSmallRecords = 1000000;
for (int firstRecordLength = 1000; firstRecordLength <= 10000; firstRecordLength+=1000) {
// 100K records is sufficient to exercise multi-block BGZF boundaries and detect the
// GZIPInputStream available() bug. 5 first-record-length variants cover the range.
final int nSmallRecords = 100_000;
for (int firstRecordLength = 1000; firstRecordLength <= 9000; firstRecordLength += 2000) {
data.add(new Object[]{createBgzipVcfsWithVariableSize(firstRecordLength, nSmallRecords), nSmallRecords+1});
}
return data.iterator();
Expand Down
22 changes: 8 additions & 14 deletions src/test/java/htsjdk/variant/bcf2/BCF2EncoderDecoderUnitTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -120,24 +120,18 @@ public void before() {
primitives.add(new BCF2TypedValue(null, type));
}

// One representative per type plus one null per non-CHAR type. Reducing from 17 to 9
// values cuts the 3-way cartesian product from 4913 to 729 test sequences while still
// covering all type combinations and null handling.
forCombinations.add(new BCF2TypedValue(10, BCF2Type.INT8));
forCombinations.add(new BCF2TypedValue(100, BCF2Type.INT8));
forCombinations.add(new BCF2TypedValue(-100, BCF2Type.INT8));
forCombinations.add(new BCF2TypedValue(-128, BCF2Type.INT16)); // first value in range
forCombinations.add(new BCF2TypedValue( 128, BCF2Type.INT16)); // first value in range
forCombinations.add(new BCF2TypedValue(-100000, BCF2Type.INT32));
forCombinations.add(new BCF2TypedValue(-128, BCF2Type.INT16));
forCombinations.add(new BCF2TypedValue(100000, BCF2Type.INT32));
forCombinations.add(new BCF2TypedValue(0.0, BCF2Type.FLOAT));
forCombinations.add(new BCF2TypedValue(1.23e6, BCF2Type.FLOAT));
forCombinations.add(new BCF2TypedValue(-1.23e6, BCF2Type.FLOAT));
forCombinations.add(new BCF2TypedValue("S", BCF2Type.CHAR));
forCombinations.add(new BCF2TypedValue("ABCDEFGHIJKLMNOPQRSTUVWXYZ", BCF2Type.CHAR));
forCombinations.add(new BCF2TypedValue("ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ", BCF2Type.CHAR));

// missing values
for ( BCF2Type type : BCF2Type.values() ) {
forCombinations.add(new BCF2TypedValue(null, type));
}
forCombinations.add(new BCF2TypedValue(null, BCF2Type.INT8));
forCombinations.add(new BCF2TypedValue(null, BCF2Type.INT16));
forCombinations.add(new BCF2TypedValue(null, BCF2Type.INT32));
forCombinations.add(new BCF2TypedValue(null, BCF2Type.FLOAT));
}

// --------------------------------------------------------------------------------
Expand Down
Loading