Skip to content

Commit

Permalink
Remove deprecated DockerComposeRule.waitingForService method
Browse files Browse the repository at this point in the history
Replace the usage of this deprecated method with the waitingForService(String serviceName, HealthCheck<Container> healthCheck, ReadableDuration timeout) method.

resolves issue spring-cloud#6013
Signed-off-by: Glenn Renfro <[email protected]>
  • Loading branch information
cppwfs committed Oct 30, 2024
1 parent 34bf7a3 commit 4571f8d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ public void build(String classKey, String methodKey) {
Builder<?> builder = DockerComposeRule.builder();
builder.files(DockerComposeFiles.from(locations.toArray(new String[0])));
for (String service : services) {
builder.waitingForService(service, toHaveAllPortsOpen());
builder.waitingForService(service, toHaveAllPortsOpen(), DockerComposeRule.DEFAULT_TIMEOUT);
}
builder.saveLogsTo("build/test-docker-logs/" + log + classKey + "-" + methodKey);
DockerComposeRule rule = builder.build();
Expand Down Expand Up @@ -132,7 +132,7 @@ public void build(String classKey, String methodKey) {
Builder<?> builder = DockerComposeRule.builder();
builder.files(DockerComposeFiles.from(locations.toArray(new String[0])));
for (String service : services) {
builder.waitingForService(service, toHaveAllPortsOpen());
builder.waitingForService(service, toHaveAllPortsOpen(), DockerComposeRule.DEFAULT_TIMEOUT);
}
builder.saveLogsTo("build/test-docker-logs/" + log + classKey + "-" + methodKey);
DockerComposeRule rule = builder.build();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -236,11 +236,6 @@ public T logCollector(LogCollector logCollector) {
return self();
}

@Deprecated
public T waitingForService(String serviceName, HealthCheck<Container> healthCheck) {
return waitingForService(serviceName, healthCheck, DEFAULT_TIMEOUT);
}

public T waitingForService(String serviceName, HealthCheck<Container> healthCheck, ReadableDuration timeout) {
ClusterHealthCheck clusterHealthCheck = serviceHealthCheck(serviceName, healthCheck);
return addClusterWait(new ClusterWait(clusterHealthCheck, timeout));
Expand Down
1 change: 1 addition & 0 deletions whats-new.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ VersionInfoProperties versionInfoProperties, SecurityStateBean securityStateBean
** getStepNamesForJob
* The following deprecated `Converters` have been removed from SCDF: `AbstractDateTimeConverter`, `DateToStringConverter`, and `StringToDateConverter`. Use the converters provided by Spring Batch.
* `findByTaskNameContainsAndDslTextContains` deprecated method has been removed from `TaskDefinitionRepository`.
* `DockerComposeRule.waitingForService(String serviceName, HealthCheck<Container> healthCheck)` has been replaced by `DockerComposeRule.waitingForService(String serviceName, HealthCheck<Container> healthCheck, ReadableDuration timeout)`.

=== Breaking Changes
Announce deprecated changes here
Expand Down

0 comments on commit 4571f8d

Please sign in to comment.