lliangyu-lin commented on code in PR #12671:
URL: https://github.com/apache/iceberg/pull/12671#discussion_r2019151375


##########
aws/src/integration/java/org/apache/iceberg/aws/dynamodb/TestMockDynamoDbLockManager.java:
##########
@@ -119,7 +136,10 @@ public void testAcquireOnceMultiProcesses() throws 
Exception {
                             })
                         .collect(Collectors.toList()))
             .get();
-    assertThat(results).as("should have only 1 process succeeded in 
acquisition").hasSize(1);
+    assertThat(results)
+        .as("should have only 1 process succeeded in acquisition")
+        .hasSize(16)

Review Comment:
   The test has been failing before the change. 
   ```
   [should have only 1 process succeeded in acquisition] 
   Expected size: 1 but was: 16 in:
   [false, true, false, false, ...]
   ```
   Because 16 tasks are trying to acquire the lock and only 1 will be returning 
true others are returning false. We could also update the comment to be `should 
have only 1 process succeeded in 16 parallel acquisitions`
   ```
   assertThat(results)
           .as("should have only 1 process succeeded in acquisition")
           .hasSize(16)
           .containsOnce(true)
   ```



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