From 768a2bce05d76fa56f92f318331ef8ba349c45d2 Mon Sep 17 00:00:00 2001 From: Ronnak Saxena Date: Thu, 7 Sep 2023 16:45:28 -0700 Subject: [PATCH] testing time of alias test case Signed-off-by: Ronnak Saxena --- .github/workflows/multi-node-test-workflow.yml | 2 +- .../rollup/interceptor/ResponseInterceptorIT.kt | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/multi-node-test-workflow.yml b/.github/workflows/multi-node-test-workflow.yml index baa186175..c6206d4ca 100644 --- a/.github/workflows/multi-node-test-workflow.yml +++ b/.github/workflows/multi-node-test-workflow.yml @@ -22,7 +22,7 @@ jobs: - name: Checkout Branch uses: actions/checkout@v2 - name: Run integration tests with multi node config - run: ./gradlew integTest -Dtests.class="org.opensearch.indexmanagement.rollup.interceptor.ResponseInterceptorIT" + run: ./gradlew integTest -Dtests.class="org.opensearch.indexmanagement.rollup.interceptor.ResponseInterceptorIT" -Dtests.method="test search multiple live data indices and a rollup data index with overlap" -PcustomDistributionUrl="https://artifacts.opensearch.org/snapshots/core/opensearch/2.9.0-SNAPSHOT/opensearch-min-2.9.0-SNAPSHOT-darwin-x64-latest.tar.gz" - name: Upload failed logs uses: actions/upload-artifact@v2 if: failure() diff --git a/src/test/kotlin/org/opensearch/indexmanagement/rollup/interceptor/ResponseInterceptorIT.kt b/src/test/kotlin/org/opensearch/indexmanagement/rollup/interceptor/ResponseInterceptorIT.kt index c6ea7a0ce..f87780443 100644 --- a/src/test/kotlin/org/opensearch/indexmanagement/rollup/interceptor/ResponseInterceptorIT.kt +++ b/src/test/kotlin/org/opensearch/indexmanagement/rollup/interceptor/ResponseInterceptorIT.kt @@ -720,6 +720,7 @@ class ResponseInterceptorIT : RollupRestTestCase() { val expectedAvg = expectedAggs.getValue("avg_passenger_count")["value"] refreshAllIndices() // Validate result from searching rollup-nyc-taxi-data, searching nyc-taxi-data + val start = System.currentTimeMillis() var searchAllResponse = client().makeRequest("POST", "/rollup-nyc-taxi-data,nyc-taxi-data/_search", emptyMap(), StringEntity(aggReq, ContentType.APPLICATION_JSON)) assertTrue(searchAllResponse.restStatus() == RestStatus.OK) var responseAggs = searchAllResponse.asMap()["aggregations"] as Map> @@ -748,5 +749,7 @@ class ResponseInterceptorIT : RollupRestTestCase() { expectedAvg, responseAggs.getValue("avg_passenger_count")["value"] ) + val elapsedTimeMs = System.currentTimeMillis() - start + assertEquals("ronsax search reqeust took $elapsedTimeMs ms", true, false) } }