Unverified Commit ccf95b0f authored by Steven Allen's avatar Steven Allen Committed by GitHub

Merge pull request #18 from libp2p/test/fix-gc-test

test: fix gc test on go 1.16
parents 1a02bce0 aec62891
......@@ -82,6 +82,8 @@ func TestPool(t *testing.T) {
debug.SetGCPercent(100) // to allow following GC to actually run
runtime.GC()
// For some reason, you need to run GC twice on go 1.16 if you want it to reliably work.
runtime.GC()
if g := p.Get(10); &g[0] == &a[0] {
t.Fatalf("got a; want new slice after GC")
}
......
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