Skip to content

Commit

Permalink
Replace assertTrue(false) with fail
Browse files Browse the repository at this point in the history
  • Loading branch information
elharo committed Apr 12, 2024
1 parent fdfa3fe commit 38bbcdb
Showing 1 changed file with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@
import static org.testng.Assert.assertEquals;
import static org.testng.Assert.assertNotNull;
import static org.testng.Assert.assertTrue;
import static org.testng.Assert.fail;

public class TestOrcReaderPositions
{
Expand Down Expand Up @@ -396,7 +397,7 @@ public void testBatchSizesForVariableWidth()
currentStringBytes += baseStringBytes;
}
else if (rowCountsInCurrentRowGroup > rowsInRowGroup) {
assertTrue(false, "read more rows in the current row group");
fail("read more rows in the current row group");
}
}
}
Expand All @@ -407,9 +408,9 @@ else if (rowCountsInCurrentRowGroup > rowsInRowGroup) {
public void testBatchSizesForFixedWidth()
throws Exception
{
// the test creates a table with one column and 10 row groups
// the each row group has bigints of length 8 in bytes,
// the test is to show that the loaded data is always bounded by MAX_BATCH_SIZE because 1024 X 8B < 1MB
// The test creates a table with one column and 10 row groups.
// Each row group has bigints of length 8 in bytes.
// The test is to show that the loaded data is always bounded by MAX_BATCH_SIZE because 1024 X 8B < 1MB
try (TempFile tempFile = new TempFile()) {
// create single strip file with multiple row groups
int rowsInRowGroup = 10_000;
Expand Down Expand Up @@ -439,7 +440,7 @@ public void testBatchSizesForFixedWidth()
rowCountsInCurrentRowGroup = 0;
}
else if (rowCountsInCurrentRowGroup > rowsInRowGroup) {
assertTrue(false, "read more rows in the current row group");
fail("read more rows in the current row group");
}
}
}
Expand Down Expand Up @@ -545,7 +546,7 @@ public void testBatchSizeGrowth()
rowCountsInCurrentRowGroup = 0;
}
else if (rowCountsInCurrentRowGroup > 20) {
assertTrue(false, "read more rows in the current row group");
fail("read more rows in the current row group");
}

expectedBatchSize = min(min(nextBatchSize, MAX_BATCH_SIZE), 20 - rowCountsInCurrentRowGroup);
Expand Down

0 comments on commit 38bbcdb

Please sign in to comment.