Skip to content

Commit a6add78

Browse files
phanhuynNguyen Phan Huy
authored andcommitted
Mock containerd-shim-runc-v2 Stats to hang
1 parent 7f7ba2b commit a6add78

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

runtime/v2/runc/task/service.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -473,7 +473,13 @@ func (s *service) Shutdown(ctx context.Context, r *taskAPI.ShutdownRequest) (*pt
473473
return empty, nil
474474
}
475475

476+
func WaitForever() {
477+
<-make(chan int)
478+
}
479+
476480
func (s *service) Stats(ctx context.Context, r *taskAPI.StatsRequest) (*taskAPI.StatsResponse, error) {
481+
WaitForever()
482+
477483
container, err := s.getContainer(r.ID)
478484
if err != nil {
479485
return nil, err

0 commit comments

Comments
 (0)