From 1f5f6bccd645069a05dc863d107dd301849e8bc9 Mon Sep 17 00:00:00 2001 From: Bharathwaj G Date: Tue, 5 Sep 2023 10:07:09 +0530 Subject: [PATCH] removing test Signed-off-by: Bharathwaj G --- .../restIT/AsynchronousSearchSettingsIT.java | 64 ------------------- 1 file changed, 64 deletions(-) diff --git a/src/test/java/org/opensearch/search/asynchronous/restIT/AsynchronousSearchSettingsIT.java b/src/test/java/org/opensearch/search/asynchronous/restIT/AsynchronousSearchSettingsIT.java index ba5a6d73..3cf8555b 100644 --- a/src/test/java/org/opensearch/search/asynchronous/restIT/AsynchronousSearchSettingsIT.java +++ b/src/test/java/org/opensearch/search/asynchronous/restIT/AsynchronousSearchSettingsIT.java @@ -58,70 +58,6 @@ public void testSubmitInvalidWaitForCompletion() throws Exception { TimeValue.timeValueSeconds(60)); } -// public void testMaxRunningAsynchronousSearchContexts() throws Exception { -// int numThreads = 50; -// List threadsList = new LinkedList<>(); -// CyclicBarrier barrier = new CyclicBarrier(numThreads + 1); -// for (int i = 0; i < numThreads; i++) { -// threadsList.add(new Thread(() -> { -// try { -// SubmitAsynchronousSearchRequest validRequest = new SubmitAsynchronousSearchRequest(new SearchRequest()); -// validRequest.keepAlive(TimeValue.timeValueHours(1)); -// AsynchronousSearchResponse asResponse = executeSubmitAsynchronousSearch(validRequest); -// logger.info("GOT RESPONSE" + asResponse.toString()); -// assertNotNull(asResponse.getSearchResponse()); -// } catch (IOException e) { -// fail("submit request failed"); -// } finally { -// try { -// barrier.await(); -// } catch (Exception e) { -// fail(); -// } -// } -// } -// )); -// } -// threadsList.forEach(Thread::start); -// barrier.await(); -// for (Thread thread : threadsList) { -// thread.join(); -// } -// -// updateClusterSettings(AsynchronousSearchActiveStore.NODE_CONCURRENT_RUNNING_SEARCHES_SETTING.getKey(), 0); -// threadsList.clear(); -// AtomicInteger numFailures = new AtomicInteger(); -// for (int i = 0; i < numThreads; i++) { -// threadsList.add(new Thread(() -> { -// try { -// SubmitAsynchronousSearchRequest validRequest = new SubmitAsynchronousSearchRequest(new SearchRequest()); -// validRequest.waitForCompletionTimeout(TimeValue.timeValueMillis(1)); -// AsynchronousSearchResponse asResponse = executeSubmitAsynchronousSearch(validRequest); -// } catch (Exception e) { -// assertTrue(e instanceof ResponseException); -// assertThat(e.getMessage(), containsString("Trying to create too many concurrent searches")); -// numFailures.getAndIncrement(); -// -// } finally { -// try { -// barrier.await(); -// } catch (Exception e) { -// fail(); -// } -// } -// } -// )); -// } -// threadsList.forEach(Thread::start); -// barrier.await(); -// for (Thread thread : threadsList) { -// thread.join(); -// } -// assertEquals(numFailures.get(), 50); -// updateClusterSettings(AsynchronousSearchActiveStore.NODE_CONCURRENT_RUNNING_SEARCHES_SETTING.getKey(), -// AsynchronousSearchActiveStore.NODE_CONCURRENT_RUNNING_SEARCHES); -// } - public void testStoreAsyncSearchWithFailures() throws Exception { SubmitAsynchronousSearchRequest request = new SubmitAsynchronousSearchRequest(new SearchRequest("non-existent-index")); request.keepOnCompletion(true);