File tree Expand file tree Collapse file tree 1 file changed +9
-8
lines changed
x-pack/plugin/esql/src/internalClusterTest/java/org/elasticsearch/xpack/esql/action Expand file tree Collapse file tree 1 file changed +9
-8
lines changed Original file line number Diff line number Diff line change @@ -110,26 +110,27 @@ public void testConcurrentQueries() throws Exception {
110110 CountDownLatch latch = new CountDownLatch (1 );
111111 for (int q = 0 ; q < numQueries ; q ++) {
112112 threads [q ] = new Thread (() -> {
113- try {
114- assertTrue (latch .await (1 , TimeUnit .MINUTES ));
115- } catch (InterruptedException e ) {
116- throw new AssertionError (e );
117- }
113+ safeAwait (latch );
118114 final var pragmas = Settings .builder ();
119115 if (randomBoolean () && canUseQueryPragmas ()) {
120116 pragmas .put (randomPragmas ().getSettings ())
121117 .put ("task_concurrency" , between (1 , 2 ))
122118 .put ("exchange_concurrent_clients" , between (1 , 2 ));
123119 }
124- run ("from test-* | stats count(user) by tags" , new QueryPragmas (pragmas .build ())).close ();
125- });
120+ try (var response = run ("from test-* | stats count(user) by tags" , new QueryPragmas (pragmas .build ()))) {
121+ // do nothing
122+ } catch (Exception | AssertionError e ) {
123+ logger .warn ("Query failed with exception" , e );
124+ throw e ;
125+ }
126+ }, "testConcurrentQueries" );
126127 }
127128 for (Thread thread : threads ) {
128129 thread .start ();
129130 }
130131 latch .countDown ();
131132 for (Thread thread : threads ) {
132- thread .join ();
133+ thread .join (10_000 );
133134 }
134135 }
135136
You can’t perform that action at this time.
0 commit comments