@@ -338,8 +338,6 @@ protected void doStart() {
338
338
try {
339
339
configure ();
340
340
341
- Instant startedAt = Instant .now ();
342
-
343
341
logger ().debug ("Starting container: {}" , getDockerImageName ());
344
342
345
343
AtomicInteger attempt = new AtomicInteger (0 );
@@ -353,7 +351,7 @@ protected void doStart() {
353
351
attempt .incrementAndGet (),
354
352
startupAttempts
355
353
);
356
- tryStart (startedAt );
354
+ tryStart ();
357
355
return true ;
358
356
}
359
357
);
@@ -380,11 +378,12 @@ protected boolean canBeReused() {
380
378
return true ;
381
379
}
382
380
383
- private void tryStart (Instant startedAt ) {
381
+ private void tryStart () {
384
382
try {
385
383
String dockerImageName = getDockerImageName ();
386
384
logger ().debug ("Starting container: {}" , dockerImageName );
387
385
386
+ Instant startedAt = Instant .now ();
388
387
logger ().info ("Creating container for image: {}" , dockerImageName );
389
388
CreateContainerCmd createCommand = dockerClient .createContainerCmd (dockerImageName );
390
389
applyConfiguration (createCommand );
@@ -1497,7 +1496,7 @@ public SELF withStartupAttempts(int attempts) {
1497
1496
}
1498
1497
1499
1498
/**
1500
- * Allow low level modifications of {@link CreateContainerCmd} after it was pre-configured in {@link #tryStart(Instant )}.
1499
+ * Allow low level modifications of {@link CreateContainerCmd} after it was pre-configured in {@link #tryStart()}.
1501
1500
* Invocation happens eagerly on a moment when container is created.
1502
1501
* Warning: this does expose the underlying docker-java API so might change outside of our control.
1503
1502
*
0 commit comments