Skip to content
This repository was archived by the owner on Oct 13, 2023. It is now read-only.

Commit a10f559

Browse files
selansenthaJeztah
authored andcommitted
TestServiceWithDefaultAddressPoolInit
Looks like TestServiceWithDefaultAddressPoolInit is failing randomly in CI. I am not able to reproduce the issue locally but this has been reported few times. So I tried to modify code and see if I can fix the random failure. Signed-off-by: selansen <elango.siva@docker.com> Signed-off-by: Sebastiaan van Stijn <github@gone.nl> (cherry picked from commit 88578aa9e9c3deaf634acc53d1460ac3e4d17e03) Signed-off-by: Sebastiaan van Stijn <github@gone.nl> Upstream-commit: 6d9666c8a0a29c7a50488ef28b0a8d6b4aed6424 Component: engine
1 parent a2d782b commit a10f559

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

components/engine/integration/network/service_test.go

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -401,9 +401,11 @@ func TestServiceWithDefaultAddressPoolInit(t *testing.T) {
401401
defer cli.Close()
402402

403403
// Create a overlay network
404-
name := "saanvisthira" + t.Name()
405-
network.CreateNoError(context.Background(), t, cli, name,
406-
network.WithDriver("overlay"))
404+
name := "sthira" + t.Name()
405+
overlayID := network.CreateNoError(context.Background(), t, cli, name,
406+
network.WithDriver("overlay"),
407+
network.WithCheckDuplicate(),
408+
)
407409

408410
var instances uint64 = 1
409411
serviceName := "TestService" + t.Name()
@@ -418,7 +420,7 @@ func TestServiceWithDefaultAddressPoolInit(t *testing.T) {
418420
_, _, err := cli.ServiceInspectWithRaw(context.Background(), serviceID, types.ServiceInspectOptions{})
419421
assert.NilError(t, err)
420422

421-
out, err := cli.NetworkInspect(context.Background(), name, types.NetworkInspectOptions{})
423+
out, err := cli.NetworkInspect(context.Background(), overlayID, types.NetworkInspectOptions{Verbose: true})
422424
assert.NilError(t, err)
423425
t.Logf("%s: NetworkInspect: %+v", t.Name(), out)
424426
assert.Assert(t, len(out.IPAM.Config) > 0)

0 commit comments

Comments
 (0)