diff --git a/metrics/bandwidth_test.go b/metrics/bandwidth_test.go index 9f74057..30bf07e 100644 --- a/metrics/bandwidth_test.go +++ b/metrics/bandwidth_test.go @@ -3,6 +3,7 @@ package metrics import ( "fmt" "math" + "runtime" "sync" "testing" "time" @@ -52,6 +53,10 @@ func round(bwc *BandwidthCounter, b *testing.B) { const acceptableError = 0.01 func TestBandwidthCounter(t *testing.T) { + if runtime.GOOS != "linux" { + // Specifically, it fails on MacOS because we need a high precision timer. + t.Skip("this test is highly timing dependent and only passes reliably on Linux") + } bwc := NewBandwidthCounter() start := make(chan struct{}) var wg sync.WaitGroup