File tree Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -79,13 +79,9 @@ func TestCPUUsageMonitor_Start_Shutdown(t *testing.T) {
7979 dockerID := "1"
8080 config .RefreshTime = 100 * time .Millisecond
8181
82- // 10% usage
83- for i := 1 ; i < 10 ; i ++ {
84- cpuStatsReader .EXPECT ().Read (gomock .Any ()).Return (procfs.CPUStats {}, nil ).AnyTimes ()
85-
86- err := errors .New ("cgroup error" )
87- cgroupStatsReader .EXPECT ().GetStats (gomock .Any (), dockerID ).Return (cgroup.Stats {}, cgroup .NewStatsReaderError (err )).MaxTimes (1 )
88- }
82+ cpuStatsReader .EXPECT ().Read (gomock .Any ()).Return (procfs.CPUStats {}, nil ).AnyTimes ()
83+ err := errors .New ("cgroup error" )
84+ cgroupStatsReader .EXPECT ().GetStats (gomock .Any (), dockerID ).Return (cgroup.Stats {}, cgroup .NewStatsReaderError (err )).MaxTimes (1 )
8985
9086 eventsChan := make (chan docker.ContainerEvent )
9187 containerRepository .EXPECT ().RegisterToContainersStream (gomock .Any ()).Return (eventsChan )
You can’t perform that action at this time.
0 commit comments