Skip to content

Commit

Permalink
renaming
Browse files Browse the repository at this point in the history
  • Loading branch information
stanislav-shymov committed Oct 12, 2024
1 parent 70d9f63 commit ca38e86
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions src/main/java/io/fabric8/maven/docker/StartMojo.java
Original file line number Diff line number Diff line change
Expand Up @@ -98,15 +98,15 @@ public class StartMojo extends AbstractDockerMojo {
@Parameter(property = "docker.autoCreateCustomNetworks", defaultValue = "false")
protected boolean autoCreateCustomNetworks;

public static final String DOCKER_DEFAULT_CONTAINER_WAIT_TIMEOUT = "docker.startContainerWaitTimeout";
public static final String DOCKER_START_CONTAINER_WAIT_TIMEOUT = "docker.startContainerWaitTimeout";

/**
* Overrides the default across all the containers wait time is milliseconds.
* Overriding that property might become particularly useful when docker-compose config defines
* the healthchecks, but the default wait timeout {@link io.fabric8.maven.docker.wait.WaitUtil#DEFAULT_MAX_WAIT}
* is too short for some containers to become healthy.
*/
@Parameter(property = DOCKER_DEFAULT_CONTAINER_WAIT_TIMEOUT, defaultValue = "10000")
@Parameter(property = DOCKER_START_CONTAINER_WAIT_TIMEOUT, defaultValue = "10000")

Check warning on line 109 in src/main/java/io/fabric8/maven/docker/StartMojo.java

View check run for this annotation

Codecov / codecov/patch

src/main/java/io/fabric8/maven/docker/StartMojo.java#L109

Added line #L109 was not covered by tests
protected int startContainerWaitTimeout = 10000;

// property file to write out with port mappings
Expand Down Expand Up @@ -285,7 +285,7 @@ private void startImage(final ImageConfiguration imageConfig,
final Properties projProperties = project.getProperties();
final RunImageConfiguration runConfig = imageConfig.getRunConfiguration();
final PortMapping portMapping = runService.createPortMapping(runConfig, projProperties);
projProperties.computeIfAbsent(DOCKER_DEFAULT_CONTAINER_WAIT_TIMEOUT, key -> startContainerWaitTimeout);
projProperties.computeIfAbsent(DOCKER_START_CONTAINER_WAIT_TIMEOUT, key -> String.valueOf(startContainerWaitTimeout));

Check warning on line 288 in src/main/java/io/fabric8/maven/docker/StartMojo.java

View check run for this annotation

Codecov / codecov/patch

src/main/java/io/fabric8/maven/docker/StartMojo.java#L288

Added line #L288 was not covered by tests
final LogDispatcher dispatcher = getLogDispatcher(hub);

StartContainerExecutor startExecutor = new StartContainerExecutor.Builder()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
import io.fabric8.maven.docker.wait.WaitTimeoutException;
import io.fabric8.maven.docker.wait.WaitUtil;

import static io.fabric8.maven.docker.StartMojo.DOCKER_DEFAULT_CONTAINER_WAIT_TIMEOUT;
import static io.fabric8.maven.docker.StartMojo.DOCKER_START_CONTAINER_WAIT_TIMEOUT;

/**
* @author roland
Expand Down Expand Up @@ -60,8 +60,8 @@ public void wait(ImageConfiguration imageConfig, Properties projectProperties, S
}
return;
}
if (timeout == 0 && projectProperties.containsKey(DOCKER_DEFAULT_CONTAINER_WAIT_TIMEOUT)) {
timeout = Integer.valueOf(projectProperties.get(DOCKER_DEFAULT_CONTAINER_WAIT_TIMEOUT).toString());
if (timeout == 0 && projectProperties.containsKey(DOCKER_START_CONTAINER_WAIT_TIMEOUT)) {
timeout = Integer.parseInt(projectProperties.getProperty(DOCKER_START_CONTAINER_WAIT_TIMEOUT, "0"));

Check warning on line 64 in src/main/java/io/fabric8/maven/docker/service/WaitService.java

View check run for this annotation

Codecov / codecov/patch

src/main/java/io/fabric8/maven/docker/service/WaitService.java#L64

Added line #L64 was not covered by tests
}

String logLine = extractCheckerLog(checkers);
Expand Down

0 comments on commit ca38e86

Please sign in to comment.