Resolve SERVICE_UNAVAILABLE in IdP IntegTest (#54700)
The SamlIdentityProviderTests IntegTests would sometimes encounter a service unavailable exception when registering a new service provider. This change ensure that there is a data node, and that the cluster state is recovered before registering providers Backport of: #54622
This commit is contained in:
parent
b2cd858f29
commit
cf442aae38
|
@ -299,6 +299,9 @@ public class SamlIdentityProviderTests extends IdentityProviderIntegTestCase {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void registerServiceProvider(String entityId, String acsUrl) throws Exception {
|
private void registerServiceProvider(String entityId, String acsUrl) throws Exception {
|
||||||
|
internalCluster().ensureAtLeastNumDataNodes(1);
|
||||||
|
ensureYellowAndNoInitializingShards();
|
||||||
|
|
||||||
Map<String, Object> spFields = new HashMap<>();
|
Map<String, Object> spFields = new HashMap<>();
|
||||||
spFields.put(SamlServiceProviderDocument.Fields.ACS.getPreferredName(), acsUrl);
|
spFields.put(SamlServiceProviderDocument.Fields.ACS.getPreferredName(), acsUrl);
|
||||||
spFields.put(SamlServiceProviderDocument.Fields.ENTITY_ID.getPreferredName(), entityId);
|
spFields.put(SamlServiceProviderDocument.Fields.ENTITY_ID.getPreferredName(), entityId);
|
||||||
|
|
Loading…
Reference in New Issue