chinmay-bhat commented on code in PR #9341:
URL: https://github.com/apache/iceberg/pull/9341#discussion_r1431484685
##########
spark/v3.5/spark/src/test/java/org/apache/iceberg/spark/data/TestSparkRecordOrcReaderWriter.java:
##########
@@ -130,24 +130,24 @@ private static void assertRecordEquals(
Iterator<Record> expectedIter = expected.iterator();
Iterator<Record> actualIter = actual.iterator();
for (int i = 0; i < size; i += 1) {
- Assert.assertTrue("Expected iterator should have more rows",
expectedIter.hasNext());
- Assert.assertTrue("Actual iterator should have more rows",
actualIter.hasNext());
- Assert.assertEquals("Should have same rows.", expectedIter.next(),
actualIter.next());
+ assertThat(expectedIter.hasNext()).as("Expected iterator should have
more rows").isTrue();
+ assertThat(actualIter.hasNext()).as("Actual iterator should have more
rows").isTrue();
+ assertThat(actualIter.next()).as("Should have same
rows.").isEqualTo(expectedIter.next());
}
- Assert.assertFalse("Expected iterator should not have any extra rows.",
expectedIter.hasNext());
- Assert.assertFalse("Actual iterator should not have any extra rows.",
actualIter.hasNext());
+ assertThat(expectedIter.hasNext()).as("Expected iterator should not have
any extra rows.").isFalse();
+ assertThat(actualIter.hasNext()).as("Actual iterator should not have any
extra rows.").isFalse();
Review Comment:
I found `.isExhausted()` can be used for the isFalse() case. Will update all
files.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]