File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed
x-pack/plugin/esql/qa/server/src/main/java/org/elasticsearch/xpack/esql/qa/rest Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -126,7 +126,6 @@ protected EsqlSpecTestCase(
126126 }
127127
128128 private static class Protected {
129- private final Object lock = new Object ();
130129 private volatile boolean completed = false ;
131130 private volatile boolean started = false ;
132131 private volatile Throwable failure = null ;
@@ -136,7 +135,7 @@ private void protectedBlock(Callable<Void> callable) {
136135 return ;
137136 }
138137 // In case tests get run in parallel, we ensure only one setup is run, and other tests wait for this
139- synchronized (lock ) {
138+ synchronized (this ) {
140139 if (completed ) {
141140 return ;
142141 }
@@ -157,6 +156,12 @@ private void protectedBlock(Callable<Void> callable) {
157156 }
158157 }
159158 }
159+
160+ private synchronized void reset () {
161+ completed = false ;
162+ started = false ;
163+ failure = null ;
164+ }
160165 }
161166
162167 private static final Protected INGEST = new Protected ();
@@ -184,15 +189,16 @@ public void setup() {
184189 @ AfterClass
185190 public static void wipeTestData () throws IOException {
186191 try {
187- INGEST .completed = false ;
188192 adminClient ().performRequest (new Request ("DELETE" , "/*" ));
189193 } catch (ResponseException e ) {
190194 // 404 here just means we had no indexes
191195 if (e .getResponse ().getStatusLine ().getStatusCode () != 404 ) {
192196 throw e ;
193197 }
194198 }
199+ INGEST .reset ();
195200 deleteViews (adminClient ());
201+ VIEWS .reset ();
196202 deleteInferenceEndpoints (adminClient ());
197203 }
198204
You can’t perform that action at this time.
0 commit comments