Embassy
Embassy copied to clipboard
Embassy_iOSTests.KqueueSelectorTests testSelectMultipleSocke is failing
The test Embassy_iOSTests.KqueueSelectorTests testSelectMultipleSocke
is failing locally
Setup :
- Mac OS 10.12.4
- Xcode 8.3.1
- Embassy v3.1.0
Test Case '-[Embassy_iOSTests.KqueueSelectorTests testSelectMultipleSocket]' started.
/Volumes/Develop/GitRepos/dagio/EmbassyStuck/Carthage/Checkouts/Embassy/Tests/EmbassyTests/KqueueSelectorTests.swift:225: error: -[Embassy_iOSTests.KqueueSelectorTests testSelectMultipleSocket] : XCTAssertEqual failed: ("[Embassy_iOSTests.FileDescriptorEvent(fileDescriptor: 42, ioEvent: Embassy.IOEvent.write), Embassy_iOSTests.FileDescriptorEvent(fileDescriptor: 44, ioEvent: Embassy.IOEvent.write)]") is not equal to ("[Embassy_iOSTests.FileDescriptorEvent(fileDescriptor: 42, ioEvent: Embassy.IOEvent.write), Embassy_iOSTests.FileDescriptorEvent(fileDescriptor: 44, ioEvent: Embassy.IOEvent.write), Embassy_iOSTests.FileDescriptorEvent(fileDescriptor: 44, ioEvent: Embassy.IOEvent.read)]") -
Test Case '-[Embassy_iOSTests.KqueueSelectorTests testSelectMultipleSocket]' failed (1.010 seconds).
This might be (??) the reason why -[DefaultHTTPServer stopAndWait]
is stuck.
@dagio
Hi Damien,
Thanks for reporting the issue, there is another issue open #31, it seems the hanging problem may have something to do with compiling option, I have no time to check it yet, but it would be nice if you can try different compiling option see if it works.
I did a little bit of digging, at appears that KqueueSelector.select(timeout:)
hangs in some cases, it hangs on calling kevent()
with nil
timeout, which means it should wait indefinitely for next kevent that never arrives.
I'm having hard times understanding what is supposed to be a source for events to debug why are they never emitted. I can continue digging into that with some guidance.