ss77892 commented on code in PR #11195:
URL: https://github.com/apache/ozone/pull/11195#discussion_r4008228729


##########
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/hdds/scm/TestXceiverClientGrpc.java:
##########
@@ -315,21 +315,37 @@ public void testStreamReadSendsImmediatelyWhenReady() 
throws Exception {
         "isReady() must be checked exactly once when stream is immediately 
ready");
   }
 
-  /** streamRead() spin-waits until isReady() becomes true, then calls 
onNext(). */
+  /** streamRead() blocks until the onReadyHandler fires and isReady() becomes 
true, then calls onNext(). */
   @Test
   public void testStreamReadWaitsUntilReadyThenSends() throws Exception {
-    TrackingStreamObserver obs = new TrackingStreamObserver(3);
+    TrackingStreamObserver obs = new TrackingStreamObserver(false);
     StreamingReadResponse response = new StreamingReadResponse(
         MockDatanodeDetails.randomDatanodeDetails(), obs);
+    // mirrors what ReadyAwareResponseObserver.beforeStart() registers on a 
real call
+    obs.setOnReadyHandler(response::signalReady);

Review Comment:
   @rich7420 thank you for your input. I've addressed this in the latest commit.



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