Skip to content

Commit

Permalink
Resolve SERVICE_UNAVAILABLE in IdP IntegTest (#54780)
Browse files Browse the repository at this point in the history
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, #54700
  • Loading branch information
tvernum committed Apr 6, 2020
1 parent 9358784 commit 617f43e
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,9 @@ public void testSpInitiatedSsoFailsForMalformedRequest() throws Exception {
}

private void registerServiceProvider(String entityId, String acsUrl) throws Exception {
internalCluster().ensureAtLeastNumDataNodes(1);
ensureYellowAndNoInitializingShards();

Map<String, Object> spFields = new HashMap<>();
spFields.put(SamlServiceProviderDocument.Fields.ACS.getPreferredName(), acsUrl);
spFields.put(SamlServiceProviderDocument.Fields.ENTITY_ID.getPreferredName(), entityId);
Expand Down

0 comments on commit 617f43e

Please sign in to comment.