Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Embassy_iOSTests.KqueueSelectorTests testSelectMultipleSocke is failing #30

Open
dagio opened this issue Apr 13, 2017 · 2 comments
Open

Comments

@dagio
Copy link

dagio commented Apr 13, 2017

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.

@fangpenlin
Copy link
Contributor

@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.

@gavrix
Copy link

gavrix commented Feb 21, 2018

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants