This is an automated email from the ASF dual-hosted git repository. jackie pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/pinot.git
The following commit(s) were added to refs/heads/master by this push: new 6f2bcde2e1 Fix a flaky test OfflineGRPCServerIntegrationTest.testQueryingGrpcServer. (#11022) 6f2bcde2e1 is described below commit 6f2bcde2e1fcee73f81cab24f4054e58d41d6b94 Author: Shen Yu <s...@startree.ai> AuthorDate: Sat Jul 1 00:50:06 2023 -0700 Fix a flaky test OfflineGRPCServerIntegrationTest.testQueryingGrpcServer. (#11022) --- .../integration/tests/OfflineGRPCServerIntegrationTest.java | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/pinot-integration-tests/src/test/java/org/apache/pinot/integration/tests/OfflineGRPCServerIntegrationTest.java b/pinot-integration-tests/src/test/java/org/apache/pinot/integration/tests/OfflineGRPCServerIntegrationTest.java index 06c17797f2..d796db5850 100644 --- a/pinot-integration-tests/src/test/java/org/apache/pinot/integration/tests/OfflineGRPCServerIntegrationTest.java +++ b/pinot-integration-tests/src/test/java/org/apache/pinot/integration/tests/OfflineGRPCServerIntegrationTest.java @@ -202,10 +202,16 @@ public class OfflineGRPCServerIntegrationTest extends BaseClusterIntegrationTest // Process server response. QueryContext queryContext = QueryContextConverterUtils.getQueryContext(sql); DataTableReducer reducer = ResultReducerFactory.getResultReducer(queryContext); - BrokerResponseNative brokerResponse = new BrokerResponseNative(); - reducer.reduceAndSetResults("mytable_OFFLINE", cachedDataSchema, dataTableMap, brokerResponse, + BrokerResponseNative streamingBrokerResponse = new BrokerResponseNative(); + reducer.reduceAndSetResults("mytable_OFFLINE", cachedDataSchema, dataTableMap, streamingBrokerResponse, DATATABLE_REDUCER_CONTEXT, mock(BrokerMetrics.class)); - assertEquals(brokerResponse.getResultTable().getRows().size(), nonStreamResultDataTable.getNumberOfRows()); + dataTableMap.clear(); + dataTableMap.put(mock(ServerRoutingInstance.class), nonStreamResultDataTable); + BrokerResponseNative nonStreamBrokerResponse = new BrokerResponseNative(); + reducer.reduceAndSetResults("mytable_OFFLINE", cachedDataSchema, dataTableMap, nonStreamBrokerResponse, + DATATABLE_REDUCER_CONTEXT, mock(BrokerMetrics.class)); + assertEquals(streamingBrokerResponse.getResultTable().getRows().size(), + nonStreamBrokerResponse.getResultTable().getRows().size()); // validate final metadata return assertEquals(responseType, CommonConstants.Query.Response.ResponseType.METADATA); --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org For additional commands, e-mail: commits-h...@pinot.apache.org