amogh-jahagirdar commented on code in PR #9722:
URL: https://github.com/apache/iceberg/pull/9722#discussion_r1491891341


##########
core/src/test/java/org/apache/iceberg/inmemory/TestInMemoryFileIO.java:
##########
@@ -108,4 +111,18 @@ public void testOverwriteBeforeAndAfterClose() throws 
IOException {
     inputStream.close();
     Assertions.assertThat(new String(buf)).isEqualTo("new data");
   }
+
+  @Test
+  public void testFilesAreSharedAcrossMultipleInstances() {
+    String location = randomLocation();
+    InMemoryFileIO fileIO = new InMemoryFileIO();
+    fileIO.addFile(location, "hello world".getBytes());
+
+    InMemoryFileIO fileIO2 = new InMemoryFileIO();
+    Assertions.assertThat(fileIO2.fileExists(location)).isTrue();

Review Comment:
   Just a nit: I'd put an `as` so that in case the test fails there's a clearer 
error message.
   
   Assertions.assertThat(fileIO2.fileExists(location)).as("File should still 
exist in another InMemoryFileIO instance").isTrue()



-- 
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: issues-unsubscr...@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org
For additional commands, e-mail: issues-h...@iceberg.apache.org

Reply via email to