Skip to content
This repository has been archived by the owner on Sep 6, 2022. It is now read-only.

Commit

Permalink
test: disable timing dependent bandwidth test unless we're on linux
Browse files Browse the repository at this point in the history
  • Loading branch information
Stebalien committed Jul 13, 2021
1 parent 28b4f85 commit aa26efd
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions metrics/bandwidth_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package metrics
import (
"fmt"
"math"
"runtime"
"sync"
"testing"
"time"
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit aa26efd

Please sign in to comment.