From b38d23a63712e00597fdb5e3b1d595554e303d6b Mon Sep 17 00:00:00 2001 From: Alexandr Morozov Date: Mon, 6 Apr 2015 13:39:02 -0700 Subject: [PATCH 1/2] Pass right timestamp instead of crap from string(int64) Problem is that --since can consume anything not near looking as timestamp. Signed-off-by: Alexandr Morozov Upstream-commit: 5fa3a6f2482521d5731c43e076926f2f5318aa94 Component: engine --- components/engine/integration-cli/docker_cli_events_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/engine/integration-cli/docker_cli_events_test.go b/components/engine/integration-cli/docker_cli_events_test.go index a41b753af1..f69904dba6 100644 --- a/components/engine/integration-cli/docker_cli_events_test.go +++ b/components/engine/integration-cli/docker_cli_events_test.go @@ -425,7 +425,7 @@ func TestEventsStreaming(t *testing.T) { eventDestroy := make(chan struct{}) go func() { - eventsCmd := exec.Command(dockerBinary, "events", "--since", string(start)) + eventsCmd := exec.Command(dockerBinary, "events", "--since", strconv.FormatInt(start, 10)) stdout, err := eventsCmd.StdoutPipe() if err != nil { t.Fatal(err) From 5c284b836c5295e34bc74654bd7b5aa315dffe32 Mon Sep 17 00:00:00 2001 From: Alexandr Morozov Date: Mon, 6 Apr 2015 13:40:56 -0700 Subject: [PATCH 2/2] Decrease timeouts in TestEventsStreaming Signed-off-by: Alexandr Morozov Upstream-commit: e45bf8d2e9b43a4f5c5ed844b333733f95ccbafb Component: engine --- .../engine/integration-cli/docker_cli_events_test.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/components/engine/integration-cli/docker_cli_events_test.go b/components/engine/integration-cli/docker_cli_events_test.go index f69904dba6..7076ab198b 100644 --- a/components/engine/integration-cli/docker_cli_events_test.go +++ b/components/engine/integration-cli/docker_cli_events_test.go @@ -476,21 +476,21 @@ func TestEventsStreaming(t *testing.T) { id <- cleanedContainerID select { - case <-time.After(30 * time.Second): + case <-time.After(5 * time.Second): t.Fatal("failed to observe container create in timely fashion") case <-eventCreate: // ignore, done } select { - case <-time.After(30 * time.Second): + case <-time.After(5 * time.Second): t.Fatal("failed to observe container start in timely fashion") case <-eventStart: // ignore, done } select { - case <-time.After(30 * time.Second): + case <-time.After(5 * time.Second): t.Fatal("failed to observe container die in timely fashion") case <-eventDie: // ignore, done @@ -503,7 +503,7 @@ func TestEventsStreaming(t *testing.T) { } select { - case <-time.After(30 * time.Second): + case <-time.After(5 * time.Second): t.Fatal("failed to observe container destroy in timely fashion") case <-eventDestroy: // ignore, done