Jackie-Jiang commented on code in PR #8491: URL: https://github.com/apache/pinot/pull/8491#discussion_r849800383
########## pinot-core/src/test/java/org/apache/pinot/core/query/reduce/StreamingReduceServiceTest.java: ########## @@ -78,19 +74,14 @@ public Void answer(InvocationOnMock invocationOnMock) } }); final ExecutorService threadPoolService = Executors.newFixedThreadPool(1); - final ServerRoutingInstance routingInstance = - new ServerRoutingInstance("localhost", 9527, TableType.OFFLINE, false); - //We cannot use TestNG's annotation like @Test(expectedExceptions = { IOException.class }) to verify + final ServerRoutingInstance routingInstance = new ServerRoutingInstance("localhost", 9527, TableType.OFFLINE); + // We cannot use TestNG's annotation like @Test(expectedExceptions = { IOException.class }) to verify // because the Exception we hope to verify is nested inside the final exception. assertTrue(verifyException(() -> { - StreamingReduceService.processIterativeServerResponse(mock(StreamingReducer.class), - threadPoolService, - ImmutableMap.of(routingInstance, mockedResponse), - 10, - mock(BaseReduceService.ExecutionStatsAggregator.class)); - return null; - }, - (cause) -> cause instanceof TimeoutException)); + StreamingReduceService.processIterativeServerResponse(mock(StreamingReducer.class), threadPoolService, + ImmutableMap.of(routingInstance, mockedResponse), 10, mock(BaseReduceService.ExecutionStatsAggregator.class)); + return null; + }, (cause) -> cause instanceof TimeoutException)); Review Comment: I didn't check the test logic, and this test is actually unrelated to the PR except for the `ServerRoutingInstance` constructor change. Reverted the unnecessary reformat change to reduce the noise for the review -- 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: commits-unsubscr...@pinot.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org For additional commands, e-mail: commits-h...@pinot.apache.org