bvolpato commented on code in PR #40781:
URL: https://github.com/apache/beam/pull/40781#discussion_r4425824230


##########
sdks/java/io/iceberg/src/test/java/org/apache/beam/sdk/io/iceberg/TableMetadataDriverTest.java:
##########
@@ -717,6 +717,28 @@ public void 
testStreamingMixedExistingAndNonExistentTables() {
                 .build()
                 .asView());
 
+    // Check the snapshots independently of when consumers read the streaming 
view.
+    PAssert.that(checkNotNull(metadataView.getPCollection()))
+        .satisfies(
+            snapshots -> {
+              boolean foundValidTable = false;
+              for (Object value : snapshots) {
+                Map<?, ?> snapshot = (Map<?, ?>) value;
+                assertNotNull(snapshot);
+                
assertTrue(!snapshot.containsKey("default.mixed_missing_table"));

Review Comment:
   Changed to `assertFalse(...)` in db7f96ada07. Spotless, Checkstyle, and the 
affected streaming test passed locally.
   



##########
sdks/java/io/iceberg/src/test/java/org/apache/beam/sdk/io/iceberg/TableMetadataDriverTest.java:
##########
@@ -731,20 +753,13 @@ public void processElement(
                         }
                         Map<String, SerializableTableSpec> viewMap = 
c.sideInput(metadataView);
                         assertNotNull(viewMap);
-                        String dest = row.getString("dest");
-                        if ("default.mixed_valid_table".equals(dest)) {
-                          assertNotNull(viewMap.get(dest));
-                          out.output("VALID_TABLE_FOUND");
-                        } else {
-                          assertTrue(!viewMap.containsKey(dest));
-                          out.output("MISSING_TABLE_NOT_FOUND");
-                        }
+                        
assertTrue(!viewMap.containsKey("default.mixed_missing_table"));

Review Comment:
   Changed to `assertFalse(...)` in db7f96ada07. Spotless, Checkstyle, and the 
affected streaming test passed locally.
   



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

Reply via email to