Fix SLM Tests Leaking Snapshot Operation (#59150) (#59155)

Fixed an issue #59082 introduced. We have to wait for no more operations
in all tests here not just the one we were waiting in already so that the cleanup
operation from the parent class can run without failure.
This commit is contained in:
Armin Braun 2020-07-07 17:19:06 +02:00 committed by GitHub
parent a896df53ac
commit 6dec2cf722
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 1 deletions

View File

@ -41,6 +41,7 @@ import org.elasticsearch.xpack.core.slm.action.ExecuteSnapshotRetentionAction;
import org.elasticsearch.xpack.core.slm.action.GetSnapshotLifecycleAction;
import org.elasticsearch.xpack.core.slm.action.PutSnapshotLifecycleAction;
import org.elasticsearch.xpack.ilm.IndexLifecycle;
import org.junit.After;
import org.junit.Before;
import java.util.Arrays;
@ -76,6 +77,11 @@ public class SLMSnapshotBlockingIntegTests extends AbstractSnapshotIntegTestCase
ensureGreen();
}
@After
public void awaitNoMoreRunningOps() throws Exception {
awaitNoMoreRunningOperations(internalCluster().getMasterName());
}
@Override
protected Collection<Class<? extends Plugin>> nodePlugins() {
return Arrays.asList(MockRepository.Plugin.class, LocalStateCompositeXPackPlugin.class, IndexLifecycle.class);
@ -391,7 +397,6 @@ public class SLMSnapshotBlockingIntegTests extends AbstractSnapshotIntegTestCase
assertEquals(SnapshotState.SUCCESS, snapshotInfo.state());
});
}
awaitNoMoreRunningOperations(internalCluster().getMasterName());
}
public void testSLMRetentionAfterRestore() throws Exception {