Skip to content

Commit

Permalink
CORE-20708 Wait for the cluster to be ready before sending REST calls…
Browse files Browse the repository at this point in the history
… in E2E tests (#6210)
  • Loading branch information
LWogan authored Jun 17, 2024
1 parent 5c30d94 commit 0bcf939
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package net.corda.e2etest.utilities.config
import com.fasterxml.jackson.databind.JsonNode
import kong.unirest.UnirestException
import net.corda.e2etest.utilities.ClusterInfo
import net.corda.e2etest.utilities.ClusterReadinessChecker
import net.corda.e2etest.utilities.DEFAULT_CLUSTER
import net.corda.e2etest.utilities.assertWithRetryIgnoringExceptions
import net.corda.e2etest.utilities.cluster
Expand Down Expand Up @@ -151,6 +152,9 @@ fun ClusterInfo.waitForConfigurationChange(
}
}

// check cluster is ready. No need to aggressively poll too much as its expected the cluster to be down for a number of seconds
ClusterReadinessChecker().assertIsReady(Duration.ofMinutes(2), Duration.ofMillis(1000))

// Wait for the service to become available again and have the expected configuration value
assertWithRetryIgnoringExceptions {
timeout(timeout)
Expand Down

0 comments on commit 0bcf939

Please sign in to comment.