From 5fa3a6f2482521d5731c43e076926f2f5318aa94 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 --- integration-cli/docker_cli_events_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/integration-cli/docker_cli_events_test.go b/integration-cli/docker_cli_events_test.go index a41b753af1..f69904dba6 100644 --- a/integration-cli/docker_cli_events_test.go +++ b/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 e45bf8d2e9b43a4f5c5ed844b333733f95ccbafb 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 --- integration-cli/docker_cli_events_test.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/integration-cli/docker_cli_events_test.go b/integration-cli/docker_cli_events_test.go index f69904dba6..7076ab198b 100644 --- a/integration-cli/docker_cli_events_test.go +++ b/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