1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00
moby--moby/integration-cli
Kir Kolyshkin 0823ab7099 TestContainerAPITop: fix flakyness
The following failure is seen in CI from time to time:

> FAIL: docker_api_containers_test.go:435: DockerSuite.TestContainerAPITop
>
> docker_api_containers_test.go:453:
>     c.Assert(top.Processes[0][10], checker.Equals, "/bin/sh -c top")
> ... obtained string = "top"
> ... expected string = "/bin/sh -c top"

The test case expects two processes in the output:

1. /bin/sh -c top
2. top

in the given order.

Now, "ps aux" output is sorted by PID*, and so since the "top" is a child
of "/bin/sh -c top" it has a higher PID and will come second as expected
by the test... unless the PIDs on the system are exhausted and PID rollover
happens, in which case PID of "top" will be lower than that of "/bin/sh".

Fix: sort output by process name.

* - in fact it is not sorted, but is being printed in the same order as
    the kernel list PID entries in /proc directory, which appears to be
    sorted by PID (see ls -1 -U /proc).

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2018-05-22 18:11:36 -07:00
..
checker Add canonical import comment 2018-02-05 16:51:57 -05:00
cli Move fakecontext, fakegit and fakestorage to internal/test 2018-04-17 09:53:09 +02:00
daemon Switch from x/net/context -> context 2018-04-23 13:52:44 -07:00
environment Add canonical import comment 2018-02-05 16:51:57 -05:00
fixtures Clean some integration-cli/fixtures package/files 2018-04-16 10:48:58 +02:00
requirement Add canonical import comment 2018-02-05 16:51:57 -05:00
testdata Clean some integration-cli/fixtures package/files 2018-04-16 10:48:58 +02:00
benchmark_test.go Remove pkg/integration and move it to testutil or integration-cli 2016-12-30 18:26:34 +01:00
check_test.go Switch from x/net/context -> context 2018-04-23 13:52:44 -07:00
daemon_swarm_hack_test.go Make internal/test/daemon.Daemon swarm aware 2018-04-11 12:10:17 +02:00
docker_api_attach_test.go Merge pull request #36612 from kolyshkin/t-attach 2018-05-08 03:26:25 +02:00
docker_api_build_test.go fix and skip some tests based on API version 2018-05-15 16:05:04 -07:00
docker_api_build_windows_test.go Add tests related to hcsshim recycle bin skipping 2018-05-03 13:37:18 -07:00
docker_api_containers_test.go TestContainerAPITop: fix flakyness 2018-05-22 18:11:36 -07:00
docker_api_containers_windows_test.go Switch from x/net/context -> context 2018-04-23 13:52:44 -07:00
docker_api_create_test.go fix and skip some tests based on API version 2018-05-15 16:05:04 -07:00
docker_api_exec_resize_test.go fix and skip some tests based on API version 2018-05-15 16:05:04 -07:00
docker_api_exec_test.go fix and skip some tests based on API version 2018-05-15 16:05:04 -07:00
docker_api_images_test.go Switch from x/net/context -> context 2018-04-23 13:52:44 -07:00
docker_api_inspect_test.go Switch from x/net/context -> context 2018-04-23 13:52:44 -07:00
docker_api_ipcmode_test.go fix and skip some tests based on API version 2018-05-15 16:05:04 -07:00
docker_api_logs_test.go fix and skip some tests based on API version 2018-05-15 16:05:04 -07:00
docker_api_network_test.go fix and skip some tests based on API version 2018-05-15 16:05:04 -07:00
docker_api_stats_test.go Switch from x/net/context -> context 2018-04-23 13:52:44 -07:00
docker_api_swarm_node_test.go Add api helpers to internal/test/daemon.Daemon 2018-04-17 16:24:31 +02:00
docker_api_swarm_service_test.go Switch from x/net/context -> context 2018-04-23 13:52:44 -07:00
docker_api_swarm_test.go Switch from x/net/context -> context 2018-04-23 13:52:44 -07:00
docker_api_test.go fix and skip some tests based on API version 2018-05-15 16:05:04 -07:00
docker_cli_attach_test.go Update libcontainerd to use containerd 1.0 2017-10-20 07:11:37 -07:00
docker_cli_attach_unix_test.go Fix TestAttachAfterDetach to work with latest client 2018-02-20 18:34:25 -05:00
docker_cli_build_test.go fix and skip some tests based on API version 2018-05-15 16:05:04 -07:00
docker_cli_build_unix_test.go Move fakecontext, fakegit and fakestorage to internal/test 2018-04-17 09:53:09 +02:00
docker_cli_by_digest_test.go Automated migration using 2018-03-16 11:03:43 -04:00
docker_cli_commit_test.go fix and skip some tests based on API version 2018-05-15 16:05:04 -07:00
docker_cli_config_create_test.go Add integration test coverage for configs 2017-05-11 10:18:44 -07:00
docker_cli_cp_from_container_test.go Migrate some copy tests to integration 2018-02-27 16:48:35 -05:00
docker_cli_cp_test.go Skip some tests in certain condition to run with e2e image 2018-03-29 09:10:39 +02:00
docker_cli_cp_to_container_test.go Migrate some copy tests to integration 2018-02-27 16:48:35 -05:00
docker_cli_cp_to_container_unix_test.go Remove deprecated environment.DockerBasePath() 2018-01-15 15:29:26 +01:00
docker_cli_cp_utils_test.go Migrate some copy tests to integration 2018-02-27 16:48:35 -05:00
docker_cli_create_test.go Move fakecontext, fakegit and fakestorage to internal/test 2018-04-17 09:53:09 +02:00
docker_cli_daemon_plugins_test.go pkg/mount: implement/use filter for mountinfo parsing 2018-04-19 14:48:09 -07:00
docker_cli_daemon_test.go Merge pull request #36744 from kolyshkin/t-enospc 2018-04-20 15:40:39 +02:00
docker_cli_events_test.go Switch from x/net/context -> context 2018-04-23 13:52:44 -07:00
docker_cli_events_unix_test.go [integration] skip ppc64le oom tests for now 2018-03-08 17:51:37 -06:00
docker_cli_exec_test.go Switch from x/net/context -> context 2018-04-23 13:52:44 -07:00
docker_cli_exec_unix_test.go Some slight tweaks for the integration test 2018-05-21 10:08:27 +08:00
docker_cli_export_import_test.go Migrate export tests to api tests 2018-03-02 00:44:03 +00:00
docker_cli_external_volume_driver_unix_test.go Small daemon refactoring and add swarm init/join helpers 2018-04-16 10:20:10 +02:00
docker_cli_health_test.go Fix GitHub spelling 2017-10-07 00:10:24 +08:00
docker_cli_history_test.go Introduce a cli package for test-integration 2017-03-23 18:35:22 +01:00
docker_cli_images_test.go Update tests to use icmd 2017-08-25 12:07:30 -04:00
docker_cli_import_test.go Update tests to use icmd 2017-08-25 12:07:30 -04:00
docker_cli_info_test.go Small daemon refactoring and add swarm init/join helpers 2018-04-16 10:20:10 +02:00
docker_cli_info_unix_test.go Remove pkg/integration and move it to testutil or integration-cli 2016-12-30 18:26:34 +01:00
docker_cli_inspect_test.go more fixes on integration 2018-05-22 11:25:25 -07:00
docker_cli_links_test.go fix and skip some tests based on API version 2018-05-15 16:05:04 -07:00
docker_cli_login_test.go Spelling fixes 2017-07-03 13:13:09 -07:00
docker_cli_logout_test.go Disallow using legacy (V1) registries 2017-12-09 02:24:43 -08:00
docker_cli_logs_bench_test.go
docker_cli_logs_test.go Fix tests creating zombie processes 2017-10-20 07:11:38 -07:00
docker_cli_netmode_test.go fix and skip some tests based on API version 2018-05-15 16:05:04 -07:00
docker_cli_network_unix_test.go Small daemon refactoring and add swarm init/join helpers 2018-04-16 10:20:10 +02:00
docker_cli_plugins_logdriver_test.go Switch from x/net/context -> context 2018-04-23 13:52:44 -07:00
docker_cli_plugins_test.go Switch from x/net/context -> context 2018-04-23 13:52:44 -07:00
docker_cli_port_test.go Fixes for dnephin review 2017-09-14 19:27:09 +02:00
docker_cli_proxy_test.go Update tests to use icmd 2017-08-25 12:07:30 -04:00
docker_cli_prune_unix_test.go Remove daemon.BuildImageWithOut and use cli helpers function 2018-04-18 16:45:55 +02:00
docker_cli_ps_test.go fix and skip some tests based on API version 2018-05-15 16:05:04 -07:00
docker_cli_pull_local_test.go Update tests to use icmd 2017-08-25 12:07:30 -04:00
docker_cli_pull_test.go Disallow using legacy (V1) registries 2017-12-09 02:24:43 -08:00
docker_cli_push_test.go Migrate DockerTrustSuite to docker/cli e2e tests 2018-03-19 09:26:35 +01:00
docker_cli_registry_user_agent_test.go Move and refactor integration-cli/registry to internal/test 2018-04-13 10:45:34 +02:00
docker_cli_restart_test.go Remove deprecated environment.DaemonPlatform() 2018-01-15 15:32:06 +01:00
docker_cli_rmi_test.go Remove deprecated environment.DaemonPlatform() 2018-01-15 15:32:06 +01:00
docker_cli_run_test.go Switch from x/net/context -> context 2018-04-23 13:52:44 -07:00
docker_cli_run_unix_test.go fix and skip some tests based on API version 2018-05-15 16:05:04 -07:00
docker_cli_save_load_test.go fix and skip some tests based on API version 2018-05-15 16:05:04 -07:00
docker_cli_save_load_unix_test.go Update tests to use icmd 2017-08-25 12:07:30 -04:00
docker_cli_search_test.go fix some ineffectual assignments 2017-01-24 11:16:19 +01:00
docker_cli_secret_create_test.go Migrate some config secret tests to api test 2018-02-25 23:58:04 +00:00
docker_cli_service_create_test.go Fix issue of ExitCode and PID not show up in Task.Status.ContainerStatus 2018-01-31 15:35:19 +00:00
docker_cli_service_health_test.go Remove daemon.BuildImageWithOut and use cli helpers function 2018-04-18 16:45:55 +02:00
docker_cli_service_logs_test.go Make internal/test/daemon.Daemon swarm aware 2018-04-11 12:10:17 +02:00
docker_cli_service_scale_test.go remove --detach on scale 2017-09-27 17:47:51 -07:00
docker_cli_service_update_test.go remove the retries for service update 2018-04-10 17:17:02 -07:00
docker_cli_sni_test.go
docker_cli_start_test.go fix and skip some tests based on API version 2018-05-15 16:05:04 -07:00
docker_cli_stats_test.go Fix tests creating zombie processes 2017-10-20 07:11:38 -07:00
docker_cli_swarm_test.go Switch from x/net/context -> context 2018-04-23 13:52:44 -07:00
docker_cli_swarm_unix_test.go Added support for swarm service isolation mode 2017-10-30 16:16:18 +01:00
docker_cli_top_test.go Remove deprecated environment.DaemonPlatform() 2018-01-15 15:32:06 +01:00
docker_cli_update_unix_test.go Move integration-cli/request to internal/test/request… 2018-04-17 16:25:59 +02:00
docker_cli_userns_test.go Remove RunCommandPipelineWithOutput 2017-08-22 17:15:26 -04:00
docker_cli_v2_only_test.go Move and refactor integration-cli/registry to internal/test 2018-04-13 10:45:34 +02:00
docker_cli_volume_test.go Switch from x/net/context -> context 2018-04-23 13:52:44 -07:00
docker_cli_wait_test.go Update tests to use icmd 2017-08-25 12:07:30 -04:00
docker_deprecated_api_v124_test.go fix and skip some tests based on API version 2018-05-15 16:05:04 -07:00
docker_deprecated_api_v124_unix_test.go Move integration-cli/request to internal/test/request… 2018-04-17 16:25:59 +02:00
docker_hub_pull_suite_test.go Small daemon refactoring and add swarm init/join helpers 2018-04-16 10:20:10 +02:00
docker_utils_test.go Switch from x/net/context -> context 2018-04-23 13:52:44 -07:00
events_utils_test.go Update libcontainerd to use containerd 1.0 2017-10-20 07:11:37 -07:00
fixtures_linux_daemon_test.go Clean some integration-cli/fixtures package/files 2018-04-16 10:48:58 +02:00
requirements_test.go fix and skip some tests based on API version 2018-05-15 16:05:04 -07:00
requirements_unix_test.go Check integration test requirements using daemon 2017-09-14 19:27:09 +02:00
test_vars_exec_test.go Introduce a environment package in integration-cli 2016-12-29 11:00:50 +01:00
test_vars_noexec_test.go Introduce a environment package in integration-cli 2016-12-29 11:00:50 +01:00
test_vars_noseccomp_test.go Introduce a environment package in integration-cli 2016-12-29 11:00:50 +01:00
test_vars_seccomp_test.go Introduce a environment package in integration-cli 2016-12-29 11:00:50 +01:00
test_vars_test.go Remove deprecated environment.DaemonPlatform() 2018-01-15 15:32:06 +01:00
test_vars_unix_test.go Introduce a environment package in integration-cli 2016-12-29 11:00:50 +01:00
test_vars_windows_test.go Introduce a environment package in integration-cli 2016-12-29 11:00:50 +01:00
utils_test.go Remove deprecated environment.DaemonPlatform() 2018-01-15 15:32:06 +01:00