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 59ad067
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions metrics/bandwidth_test.go
Expand Up @@ -3,6 +3,7 @@ package metrics
import (
"fmt"
"math"
"runtime"
"sync"
"testing"
"time"
Expand Down Expand Up @@ -135,6 +136,10 @@ func TestBandwidthCounter(t *testing.T) {
}

func TestResetBandwidthCounter(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()

p := peer.ID("peer-0")
Expand Down

0 comments on commit 59ad067

Please sign in to comment.