mirror of
https://github.com/netbirdio/gvisor.git
synced 2026-05-22 17:12:49 -07:00
Reduce test sleep time
PiperOrigin-RevId: 201428433 Change-Id: I72de1e46788ec84f61513416bb690956e515907e
This commit is contained in:
committed by
Shentubot
parent
2f59ba0e2d
commit
95cb01e0a9
@@ -205,7 +205,9 @@ func TestLifecycle(t *testing.T) {
|
||||
// Wait on the container.
|
||||
var wg sync.WaitGroup
|
||||
wg.Add(1)
|
||||
ch := make(chan struct{})
|
||||
go func() {
|
||||
ch <- struct{}{}
|
||||
ws, err := s.Wait()
|
||||
if err != nil {
|
||||
t.Fatalf("error waiting on container: %v", err)
|
||||
@@ -218,7 +220,8 @@ func TestLifecycle(t *testing.T) {
|
||||
|
||||
// Wait a bit to ensure that we've started waiting on the container
|
||||
// before we signal.
|
||||
time.Sleep(5 * time.Second)
|
||||
<-ch
|
||||
time.Sleep(100 * time.Millisecond)
|
||||
// Send the container a SIGTERM which will cause it to stop.
|
||||
if err := s.Signal(syscall.SIGTERM); err != nil {
|
||||
t.Fatalf("error sending signal %v to container: %v", syscall.SIGTERM, err)
|
||||
|
||||
Reference in New Issue
Block a user