Skip to content

DockerSuite.TestAttachDetach: increase timeout#37711

Closed
kolyshkin wants to merge 1 commit intomoby:masterfrom
kolyshkin:attach-detach-test
Closed

DockerSuite.TestAttachDetach: increase timeout#37711
kolyshkin wants to merge 1 commit intomoby:masterfrom
kolyshkin:attach-detach-test

Conversation

@kolyshkin
Copy link
Contributor

The following failure was observed on power CI:

FAIL: docker_cli_attach_unix_test.go:127: DockerSuite.TestAttachDetach

docker_cli_attach_unix_test.go:174:
c.Fatal("timed out waiting for container to exit")
... Error: timed out waiting for container to exit

Allegedly it is caused by a very small timeout of 10ms,
and a general slowness of power today. Also note that
the timeout used to be 500ms before commit ae0883c
("Move TestAttachDetach to integration-cli").

Increase the timeout to 100ms to avoid false failures.

The following failure was observed on power CI:

> FAIL: docker_cli_attach_unix_test.go:127: DockerSuite.TestAttachDetach
>
> docker_cli_attach_unix_test.go:174:
> c.Fatal("timed out waiting for container to exit")
> ... Error: timed out waiting for container to exit

Allegedly it is caused by a very small timeout of 10ms,
and a general slowness of power today. Also note that
the timeout used to be 500ms before commit ae0883c
("Move TestAttachDetach to integration-cli").

Increase the timeout to 100ms to avoid false failures.

Signed-off-by: Kir Kolyshkin <[email protected]>
select {
case <-ch:
case <-time.After(10 * time.Millisecond):
case <-time.After(100 * time.Millisecond):
Copy link
Contributor

Choose a reason for hiding this comment

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

Ah, I remember that I tweak the timeout value to avoid some false positive test failure, but some concerns raised to worry about this behavior probably paper cover some potential issue, e.g, performance 😄 .

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is interesting. I checked git history, the only meaningful change to this test was done in commit ae0883c when it was moved to integration-cli.

The original test (before the above commit) was

  • ...
  • sending escape sequence to "attach";
  • checking that "attach" is exiting (after an escape sequence is sent);
  • checking that the container is still alive;
  • kills the containers.
    Also, timeouts were big at that time :)

The new test (after the commit):

  • sends the escape sequence to "attach";
  • checks that the container is running;
  • kills the container;
  • checks that the "attach" has exited.

It seems that the order is very broken. I'll send another PR.

@kolyshkin
Copy link
Contributor Author

kolyshkin commented Aug 24, 2018

Closed in favor of #37711 err #37718, which also fixes the test logic itself.

@kolyshkin kolyshkin closed this Aug 24, 2018
@kolyshkin kolyshkin deleted the attach-detach-test branch August 24, 2018 22:33
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.

3 participants