Skip to content

TestRenameAnonymousContainer: fix error msg#38490

Merged
thaJeztah merged 1 commit intomoby:masterfrom
kolyshkin:test-rename-anon-ct
Jan 5, 2019
Merged

TestRenameAnonymousContainer: fix error msg#38490
thaJeztah merged 1 commit intomoby:masterfrom
kolyshkin:test-rename-anon-ct

Conversation

@kolyshkin
Copy link
Contributor

A recent CI run (https://jenkins.dockerproject.org/job/Docker-PRs-experimental/43541/console, from #38452) shows a (seemingly random) failure from this test:

00:14:37.289 --- FAIL: TestRenameAnonymousContainer (1.75s)
00:14:37.289 rename_test.go:169: assertion failed: 0 (int) != 1 (inspect.State.ExitCode int): container baac251d5a1cb2221ffedf6f10acbad166b90e3549601e96d908e76762675a81 exited with the wrong exitcode: {ContainerJSONBase:0xc0007a4840 Mounts:[] Config:0xc000714500 NetworkSettings:0xc000235b00}

Apparently, printing the whole inspect value does not make any sense.
Let's output inspect.State.Error instead, maybe it will help to
figure out what is going on here.

Signed-off-by: Kir Kolyshkin [email protected]

- What I did

- How I did it

- How to verify it

- Description for the changelog

- A picture of a cute animal (not mandatory but encouraged)

A recent CI run shows a (seemingly random) failure from this test:

> 00:14:37.289 --- FAIL: TestRenameAnonymousContainer (1.75s)
> 00:14:37.289 rename_test.go:169: assertion failed: 0 (int) != 1 (inspect.State.ExitCode int): container baac251d5a1cb2221ffedf6f10acbad166b90e3549601e96d908e76762675a81 exited with the wrong exitcode: {ContainerJSONBase:0xc0007a4840 Mounts:[] Config:0xc000714500 NetworkSettings:0xc000235b00}

Apparently, printing the whole `inspect` value does not make any sense.
Let's output `inspect.State.Error` instead, maybe it will help to
figure out what is going on here.

Signed-off-by: Kir Kolyshkin <[email protected]>
Copy link
Member

@thaJeztah thaJeztah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Member

@vdemeester vdemeester left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🐯

@olljanat
Copy link
Contributor

olljanat commented Jan 4, 2019

Derek add label: rebuild/janky

Copy link
Contributor

@fntlnz fntlnz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@thaJeztah
Copy link
Member

Janky is a flaky test; I'll try once more

21:39:29 FAIL: docker_cli_swarm_test.go:1317: DockerSwarmSuite.TestSwarmClusterRotateUnlockKey
21:39:29 
21:39:29 [d7a57bdfa2a8f] waiting for daemon to start
21:39:29 [d7a57bdfa2a8f] daemon started
21:39:29 
21:39:29 [de81d7bb84d94] waiting for daemon to start
21:39:29 [de81d7bb84d94] daemon started
21:39:29 
21:39:29 [d54e7f8a2769c] waiting for daemon to start
21:39:29 [d54e7f8a2769c] daemon started
21:39:29 
21:39:29 [de81d7bb84d94] exiting daemon
21:39:29 [de81d7bb84d94] waiting for daemon to start
21:39:29 [de81d7bb84d94] daemon started
21:39:29 
21:39:29 [d54e7f8a2769c] exiting daemon
21:39:29 [d54e7f8a2769c] waiting for daemon to start
21:39:29 [d54e7f8a2769c] daemon started
21:39:29 
21:39:29 [de81d7bb84d94] exiting daemon
21:39:29 [de81d7bb84d94] waiting for daemon to start
21:39:29 [de81d7bb84d94] daemon started
21:39:29 
21:39:29 [de81d7bb84d94] exiting daemon
21:39:29 [de81d7bb84d94] waiting for daemon to start
21:39:29 [de81d7bb84d94] daemon started
21:39:29 
21:39:29 [d54e7f8a2769c] exiting daemon
21:39:29 [d54e7f8a2769c] waiting for daemon to start
21:39:29 [d54e7f8a2769c] daemon started
21:39:29 
21:39:29 docker_cli_swarm_test.go:1387:
21:39:29     c.Assert(err, checker.IsNil, check.Commentf("%s", outs))
21:39:29 ... value *exec.ExitError = &exec.ExitError{ProcessState:(*os.ProcessState)(0xc000ac3bc0), Stderr:[]uint8(nil)} ("exit status 1")
21:39:29 ... Error response from daemon: rpc error: code = Unknown desc = The swarm does not have a leader. It's possible that too few managers are online. Make sure more than half of the managers are online.
21:39:29 
21:39:29 
21:39:29 [d7a57bdfa2a8f] exiting daemon
21:39:29 [de81d7bb84d94] exiting daemon
21:39:29 [d54e7f8a2769c] exiting daemon

@codecov
Copy link

codecov bot commented Jan 5, 2019

Codecov Report

❗ No coverage uploaded for pull request base (master@2b7e084). Click here to learn what that means.
The diff coverage is n/a.

@@            Coverage Diff            @@
##             master   #38490   +/-   ##
=========================================
  Coverage          ?    36.7%           
=========================================
  Files             ?      608           
  Lines             ?    45195           
  Branches          ?        0           
=========================================
  Hits              ?    16587           
  Misses            ?    26322           
  Partials          ?     2286

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants