adoroszlai opened a new pull request, #4225:
URL: https://github.com/apache/ozone/pull/4225

   ## What changes were proposed in this pull request?
   
   Fix timeout in `TestPushReplicator`:
   
   ```
   "main" 
      java.lang.Thread.State: WAITING
           at sun.misc.Unsafe.park(Native Method)
           at java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)
           at 
java.util.concurrent.CompletableFuture$Signaller.block(CompletableFuture.java:1707)
           at 
java.util.concurrent.ForkJoinPool.managedBlock(ForkJoinPool.java:3323)
           at 
java.util.concurrent.CompletableFuture.waitingGet(CompletableFuture.java:1742)
           at 
java.util.concurrent.CompletableFuture.get(CompletableFuture.java:1908)
           at 
org.apache.hadoop.ozone.container.replication.PushReplicator.replicate(PushReplicator.java:62)
           at 
org.apache.hadoop.ozone.container.replication.TestPushReplicator.uploadCompletesNormally(TestPushReplicator.java:61)
   ```
   
   The problem is that `PushReplicator` now (after HDDS-7778) wraps the output 
stream for counting bytes, but the test expects the original output stream to 
be passed to `ContainerReplicationSource#copyData`.  The `CompletableFuture` is 
completed by the mock's answer for the call with right arguments.  Since this 
call is not made, `CompletableFuture#get()` blocks.
   
   https://issues.apache.org/jira/browse/HDDS-7856
   
   ## How was this patch tested?
   
   ```
   [INFO] Running 
org.apache.hadoop.ozone.container.replication.TestPushReplicator
   [INFO] Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.348 
s - in org.apache.hadoop.ozone.container.replication.TestPushReplicator
   ```


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


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

Reply via email to