Apache9 commented on PR #7626:
URL: https://github.com/apache/hbase/pull/7626#issuecomment-3752772878

   While rewriting and debugging, I found a possible problem is that, for 
testTimeout and testAsyncTimeout, when the test method finishes, the rpc call 
is still executing(sleeping), so when it finishes, it will record a tracing 
span in the global opentelemetry instance.
   
   In JUnit4, since we always reset the global opentelemetry instance, so this 
may cause exception describe 
[there](https://github.com/apache/hbase/pull/7604#issuecomment-3729179157). And 
in JUnit5, we do not reset the global instance but the timeout call may add new 
spans after we clear all the spans for the previous test and cause the next 
test to fail because of unexpected spans.
   
   So the main fix is that, I added a check before shutting down the rpc server 
in testTimeout and testAsyncTimeout, to wait until all the pending calls are 
finished. In this way I think the test will be more stable.
   
   @ndimiduk FYI.


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

Reply via email to