forked from ipfs/kubo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Deflake TestFindPeerQuery (ipfs#245)
* Rework TestFindPeersQuery Unravel the logic and create a minimal test case that isn't flaky. * Use testing.T.Logf * Skip the original test in short mode * Add comments for the arguments to testFindPeerQuery * Qualify aberrant package name * Use redundant package names * gx import testify 1.3.0.
- Loading branch information
Showing
4 changed files
with
76 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
// +build !windows | ||
|
||
package dht | ||
|
||
import "syscall" | ||
|
||
func curFileLimit() uint64 { | ||
var n syscall.Rlimit | ||
syscall.Getrlimit(syscall.RLIMIT_NOFILE, &n) | ||
return n.Cur | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
package dht | ||
|
||
func curFileLimit() uint64 { | ||
return 16 * 1024 * 1024 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters