Jackie-Jiang opened a new issue, #20094: URL: https://github.com/apache/pinot/issues/20094
`SingleConnectionBrokerRequestHandlerFailureDetectorTest.testServerWhoseQueryEngineIsStuckStaysInRouting` fails because its query-server fixture mocks the old scheduler entry point. The broker receives an immediate error response instead of the timeout the test is intended to exercise. ### Failed CI runs Both failures are in **Pinot Unit Test Set 2 (temurin-25)**: - [PR #20087, run 40863677272, job 123412935851](https://github.com/apache/pinot/actions/runs/40863677272/job/123412935851), head `b2cb8cc1d8cd6ce19a616f6afe5e2a26206504a0`. - [Master/base commit, run 40855315109, job 123384691667](https://github.com/apache/pinot/actions/runs/40855315109/job/123384691667), commit `3f6fef49e05dec8414ebecca0373ce0cea14cef6`. ```text SingleConnectionBrokerRequestHandlerFailureDetectorTest .testServerWhoseQueryEngineIsStuckStaysInRouting:323 expected [true] but found [false] ``` The assertion is `assertTrue(scatter(offlineRouteTo(stuckServer)).isTimedOut())`. It fails before the assertions about the server remaining in routing. ### Cause The migration in #19943 changed [InstanceRequestHandler.submitQuery()](https://github.com/apache/pinot/blob/b2cb8cc1d8cd6ce19a616f6afe5e2a26206504a0/pinot-core/src/main/java/org/apache/pinot/core/transport/InstanceRequestHandler.java#L186-L202) to call `QueryScheduler.submitResponse()`, which returns `ListenableFuture<DataBuffer>`. However, [QueryServerTestUtils.newQueryServer()](https://github.com/apache/pinot/blob/b2cb8cc1d8cd6ce19a616f6afe5e2a26206504a0/pinot-core/src/test/java/org/apache/pinot/core/transport/QueryServerTestUtils.java) still stubs `queryScheduler.submit(any())`. Mockito returns null for the unstubbed `submitResponse()` call. The PR log records: ```text Caught exception while submitting query request: 123 java.lang.NullPointerException: Cannot invoke "com.google.common.util.concurrent.ListenableFuture.addListener(java.lang.Runnable, java.util.concurrent.Executor)" because "future" is null at com.google.common.util.concurrent.Futures.addCallback(Futures.java:1094) at org.apache.pinot.core.transport.InstanceRequestHandler.submitQuery(InstanceRequestHandler.java:201) ``` The handler catches the exception and sends an error response, so the scatter completes without timing out. This failure is already present on the base commit and is unrelated to #20087's dnsjava version bump. ### Suggested fix Update the shared fixture to stub `submitResponse()` and migrate its callers to return `DataBuffer` futures, including the never-completing future used by the stuck-query test and the immediate response used by the responding-server fixture. Validate the broker failure-detector tests and other tests using this helper. Diagnosis is based on CI logs and source inspection; no local reproduction has been run. -- 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]
