1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Merge pull request #37119 from kolyshkin/test-top

TestContainerAPITop: fix flakyness
This commit is contained in:
Sebastiaan van Stijn 2018-05-23 10:05:42 +02:00 committed by GitHub
commit f800701008
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -442,7 +442,8 @@ func (s *DockerSuite) TestContainerAPITop(c *check.C) {
c.Assert(err, checker.IsNil)
defer cli.Close()
top, err := cli.ContainerTop(context.Background(), id, []string{"aux"})
// sort by comm[andline] to make sure order stays the same in case of PID rollover
top, err := cli.ContainerTop(context.Background(), id, []string{"aux", "--sort=comm"})
c.Assert(err, checker.IsNil)
c.Assert(top.Titles, checker.HasLen, 11, check.Commentf("expected 11 titles, found %d: %v", len(top.Titles), top.Titles))