openinx commented on a change in pull request #2047:
URL: https://github.com/apache/iceberg/pull/2047#discussion_r585556072



##########
File path: 
flink/src/test/java/org/apache/iceberg/flink/source/TestFlinkScan.java
##########
@@ -245,74 +204,80 @@ private void validateIdentityPartitionProjections(
 
   @Test
   public void testSnapshotReads() throws Exception {
-    Table table = catalog.createTable(TableIdentifier.of("default", "t"), 
SCHEMA);
+    Table table = catalog.createTable(TestFixtures.TABLE_IDENTIFIER, 
TestFixtures.SCHEMA);
 
     GenericAppenderHelper helper = new GenericAppenderHelper(table, 
fileFormat, TEMPORARY_FOLDER);
 
-    List<Record> expectedRecords = RandomGenericData.generate(SCHEMA, 1, 0L);
+    List<Record> expectedRecords = 
RandomGenericData.generate(TestFixtures.SCHEMA, 1, 0L);
     helper.appendToTable(expectedRecords);
     long snapshotId = table.currentSnapshot().snapshotId();
 
     long timestampMillis = table.currentSnapshot().timestampMillis();
 
     // produce another timestamp
     waitUntilAfter(timestampMillis);
-    helper.appendToTable(RandomGenericData.generate(SCHEMA, 1, 0L));
-
-    assertRecords(
-        runWithOptions(ImmutableMap.<String, 
String>builder().put("snapshot-id", Long.toString(snapshotId)).build()),
-        expectedRecords, SCHEMA);
-    assertRecords(
-        runWithOptions(
-            ImmutableMap.<String, String>builder().put("as-of-timestamp", 
Long.toString(timestampMillis)).build()),
-        expectedRecords, SCHEMA);
+    helper.appendToTable(RandomGenericData.generate(TestFixtures.SCHEMA, 1, 
0L));
+
+    TestHelpers.assertRecords(
+        runWithOptions(ImmutableMap.<String, String>builder()

Review comment:
       nit: here we could just use: 
   ```java
   ImmutableMap.of("snapshot-id", Long.toString(snapshotId);
   ```




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to