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


##########
aws/src/integration/java/org/apache/iceberg/aws/dynamodb/TestDynamoDbLockManager.java:
##########
@@ -128,7 +128,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 16 parallel acquisitions")
+        .hasSize(16)

Review Comment:
   @danielcweeks Thanks for reviewing this!
   
   For the size change, I think this test has always been failing. When running 
locally, I'm getting following error:
   ```
   [should have only 1 process succeeded in acquisition] 
   Expected size: 1 but was: 16 in:
   [false, true, false, false, ...]
   ```
   Which make sense when looking at how the test is written. 16 tasks are 
trying to acquire the lock and only 1 will be returning true others are 
returning false, and we are collecting the boolean result from each task into 
an array.
   ```
   POOL.submit(
                   () ->
                       IntStream.range(0, 16)
                           .parallel()
                           .mapToObj(...
   ```



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