Skip to content

Commit 9e9af20

Browse files
committed
Bumped the number of iterations for testFDSetBitFields() function from 128 to 1024, the default number of open descriptors on Linux.
1 parent 5966ea3 commit 9e9af20

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

Tests/SocketTests/SocketTests.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1129,7 +1129,9 @@ class SocketTests: XCTestCase {
11291129
var fdSet = fd_set()
11301130
fdSet.zero()
11311131

1132-
for i: Int32 in 0...128 {
1132+
// The default number of max open file descriptors on Linux is 1024. On macOS,
1133+
// the default is unlimited. I think checking for 1024 should be enough...
1134+
for i: Int32 in 0...1024 {
11331135
fdSet.set(i)
11341136
XCTAssertTrue(fdSet.isSet(i))
11351137
fdSet.clear(i)

0 commit comments

Comments
 (0)