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{})
|
eventDestroy := make(chan struct{})
|
||||||
|
|
||||||
go func() {
|
go func() {
|
||||||
eventsCmd := exec.Command(dockerBinary, "events", "--since", string(start))
|
eventsCmd := exec.Command(dockerBinary, "events", "--since", strconv.FormatInt(start, 10))
|
||||||
stdout, err := eventsCmd.StdoutPipe()
|
stdout, err := eventsCmd.StdoutPipe()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
|
@ -476,21 +476,21 @@ func TestEventsStreaming(t *testing.T) {
|
||||||
id <- cleanedContainerID
|
id <- cleanedContainerID
|
||||||
|
|
||||||
select {
|
select {
|
||||||
case <-time.After(30 * time.Second):
|
case <-time.After(5 * time.Second):
|
||||||
t.Fatal("failed to observe container create in timely fashion")
|
t.Fatal("failed to observe container create in timely fashion")
|
||||||
case <-eventCreate:
|
case <-eventCreate:
|
||||||
// ignore, done
|
// ignore, done
|
||||||
}
|
}
|
||||||
|
|
||||||
select {
|
select {
|
||||||
case <-time.After(30 * time.Second):
|
case <-time.After(5 * time.Second):
|
||||||
t.Fatal("failed to observe container start in timely fashion")
|
t.Fatal("failed to observe container start in timely fashion")
|
||||||
case <-eventStart:
|
case <-eventStart:
|
||||||
// ignore, done
|
// ignore, done
|
||||||
}
|
}
|
||||||
|
|
||||||
select {
|
select {
|
||||||
case <-time.After(30 * time.Second):
|
case <-time.After(5 * time.Second):
|
||||||
t.Fatal("failed to observe container die in timely fashion")
|
t.Fatal("failed to observe container die in timely fashion")
|
||||||
case <-eventDie:
|
case <-eventDie:
|
||||||
// ignore, done
|
// ignore, done
|
||||||
|
@ -503,7 +503,7 @@ func TestEventsStreaming(t *testing.T) {
|
||||||
}
|
}
|
||||||
|
|
||||||
select {
|
select {
|
||||||
case <-time.After(30 * time.Second):
|
case <-time.After(5 * time.Second):
|
||||||
t.Fatal("failed to observe container destroy in timely fashion")
|
t.Fatal("failed to observe container destroy in timely fashion")
|
||||||
case <-eventDestroy:
|
case <-eventDestroy:
|
||||||
// ignore, done
|
// ignore, done
|
||||||
|
|
Loading…
Reference in a new issue