Skip to content

Commit d92e994

Browse files
committed
test(integ-test): skip index cleanup when client is null
Signed-off-by: Chen Dai <daichen@amazon.com>
1 parent 965bb01 commit d92e994

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

integ-test/src/test/java/org/opensearch/sql/legacy/SQLIntegTestCase.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,11 @@ public static void dumpCoverage() {
139139
*/
140140
@AfterClass
141141
public static void cleanUpIndices() throws IOException {
142+
// No client when every test in the class was skipped (e.g. @RequiresCapability on the AE
143+
// route).
144+
if (client() == null) {
145+
return;
146+
}
142147
if (System.getProperty("tests.rest.bwcsuite") == null) {
143148
wipeAllOpenSearchIndices();
144149
wipeAllClusterSettings();

0 commit comments

Comments
 (0)