Skip to content

Commit

Permalink
removing test
Browse files Browse the repository at this point in the history
Signed-off-by: Bharathwaj G <[email protected]>
  • Loading branch information
bharath-techie committed Sep 5, 2023
1 parent aa9e507 commit 1f5f6bc
Showing 1 changed file with 0 additions and 64 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,70 +58,6 @@ public void testSubmitInvalidWaitForCompletion() throws Exception {
TimeValue.timeValueSeconds(60));
}

// public void testMaxRunningAsynchronousSearchContexts() throws Exception {
// int numThreads = 50;
// List<Thread> 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);
Expand Down

0 comments on commit 1f5f6bc

Please sign in to comment.