Skip to content

Commit 3fdffb1

Browse files
committed
Add a pause between retries, fixed some logging
1 parent fda2612 commit 3fdffb1

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

test/octopus_container_test_framework.go

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@ func (o *OctopusContainerTest) ArrangeTest(t *testing.T, testFunc func(t *testin
307307
sqlStopErr := sqlServer.Stop(ctx, &stopTime)
308308

309309
if sqlStopErr != nil {
310-
t.Log("Failed to stop the Octopus container")
310+
t.Log("Failed to stop the MSSQL container")
311311
}
312312

313313
// Terminate the containers
@@ -319,6 +319,14 @@ func (o *OctopusContainerTest) ArrangeTest(t *testing.T, testFunc func(t *testin
319319
if octoTerminateErr != nil || sqlTerminateErr != nil || networkErr != nil {
320320
t.Fatalf("failed to terminate container: %v %v", octoTerminateErr, sqlTerminateErr)
321321
}
322+
323+
if networkErr != nil {
324+
t.Fatalf("failed to remove network: %v", networkErr)
325+
}
326+
327+
// I've noticed some race conditions where it appears a terminated container is reused in the
328+
// retry loop. We give the Docker resources a chance to clean up before continuing.
329+
time.Sleep(30 * time.Second)
322330
}()
323331

324332
// give the server 5 minutes to start up

0 commit comments

Comments
 (0)