diff --git a/metric/cpu/metric_windows_test.go b/metric/cpu/metric_windows_test.go index 3cfaf75cc..a9aab4925 100644 --- a/metric/cpu/metric_windows_test.go +++ b/metric/cpu/metric_windows_test.go @@ -28,7 +28,7 @@ import ( ) func TestCounterLength(t *testing.T) { - monitor, err := New(systemtests.DockerTestResolver()) + monitor, err := New(systemtests.DockerTestResolver(), WithWindowsPerformanceCounter()) require.NoError(t, err) require.NoError(t, monitor.query.CollectData()) @@ -52,3 +52,9 @@ func TestCounterLength(t *testing.T) { require.Equal(t, kernelRawData[i].InstanceName, idleRawData[i].InstanceName, "InstanceName should be equal") } } + +func TestCounterDisabled(t *testing.T) { + monitor, err := New(systemtests.DockerTestResolver(), WithWindowsPerformanceCounter()) + require.NoError(t, err) + require.Nil(t, monitor.query) +}