Test: TokenAuthIntegTests ensures security index writable before invalidating
This commit makes sure the TokenAuthIntegTests wait for the security index to be writable before each test method as invalidation requires writing to the security index. Relates elastic/x-pack-elasticsearch#1551 Original commit: elastic/x-pack-elasticsearch@6e22885102
This commit is contained in:
parent
5190a05b75
commit
9357369d57
|
@ -21,6 +21,7 @@ import org.elasticsearch.xpack.security.action.token.CreateTokenResponse;
|
|||
import org.elasticsearch.xpack.security.action.token.InvalidateTokenResponse;
|
||||
import org.elasticsearch.xpack.security.client.SecurityClient;
|
||||
import org.junit.After;
|
||||
import org.junit.Before;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.UncheckedIOException;
|
||||
|
@ -112,6 +113,11 @@ public class TokenAuthIntegTests extends SecurityIntegTestCase {
|
|||
}
|
||||
}
|
||||
|
||||
@Before
|
||||
public void waitForSecurityIndexWritable() throws Exception {
|
||||
assertSecurityIndexWriteable();
|
||||
}
|
||||
|
||||
@After
|
||||
public void wipeSecurityIndex() throws InterruptedException {
|
||||
// get the token service and wait until token expiration is not in progress!
|
||||
|
|
Loading…
Reference in New Issue