Commit fa105548 authored by Adin Schmahmann's avatar Adin Schmahmann

test: skip trie memory usage test when the race detector is enabled

parent 8bf469e9
......@@ -2,4 +2,7 @@ module github.com/libp2p/go-cidranger
go 1.14
require github.com/stretchr/testify v1.4.0
require (
github.com/ipfs/go-detect-race v0.0.1
github.com/stretchr/testify v1.4.0
)
......@@ -2,6 +2,7 @@ package cidranger
import (
"encoding/binary"
detectrace "github.com/ipfs/go-detect-race"
"math/rand"
"net"
"runtime"
......@@ -486,6 +487,11 @@ func TestTrieMemUsage(t *testing.T) {
if testing.Short() {
t.Skip("Skipping memory test in `-short` mode")
}
if detectrace.WithRace() {
t.Skip("Skipping memory test in `-race` mode")
}
numIPs := 100000
runs := 10
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment