mirror of
https://github.com/ipfs/kubo.git
synced 2025-10-24 15:12:55 +08:00
fix too many FD error on osx
License: MIT Signed-off-by: Jeromy Johnson <why@ipfs.io>
This commit is contained in:
@ -1,6 +1,7 @@
|
|||||||
package swarm
|
package swarm
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"runtime"
|
||||||
"sync"
|
"sync"
|
||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
@ -49,7 +50,8 @@ func TestSimultOpenMany(t *testing.T) {
|
|||||||
|
|
||||||
addrs := 20
|
addrs := 20
|
||||||
rounds := 10
|
rounds := 10
|
||||||
if ci.IsRunning() {
|
if ci.IsRunning() || runtime.GOOS == "darwin" {
|
||||||
|
// osx has a limit of 256 file descriptors
|
||||||
addrs = 10
|
addrs = 10
|
||||||
rounds = 5
|
rounds = 5
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user