mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Merge pull request #12125 from LK4D4/fix_events_streaming_test
Fix events streaming test
This commit is contained in:
commit
3588c5fbc7
1 changed files with 5 additions and 5 deletions
|
@ -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)
|
||||
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue