Fixes for Mac OS X#23
Conversation
dnwe
commented
Apr 27, 2015
- default to building universal binaries so the various language bindings can link against the system libraries out of the box
- small fix to SelectableMessengerTest as it was regularly failing on Mac builds.
The system-installed Perl, Python etc. are all built as universal binaries on Mac and so we need to build libqpid-proton to similarly contain both architectures. This allows the bindings to link successfully.
The SelectableMessengerTest was failing intermittently on Mac builds, Modify the test slightly to be more resilient.
|
@rhs I believe you originally wrote the SelectableMessengerTest, could you take a look at change and confirm if this is an acceptable change in the test behaviour? It wasn't clear to me if you were intending to validate that a single call to Pump#pump would always result in at least one message being flowed into incoming? |
|
I'm a little puzzled as to why the test change would be necessary. Pump has been written to keep looping until there is no I/O left to perform for any of its messengers. Given that the receiving messenger has issued credit, and the sending messenger has posted messages for transfer, I think this is probably somehow indicative of a real bug somewhere (possibly in some of the test framework code). How easy is it to reproduce this on a mac? |
|
@rhs readily reproducible, output from 20 runs |
|
Hmm, I'm not sure how useful the trace is since it is once where all the tests passed. Any chance you could grab one where the tests fail? Thinking a bit more, I think the test makes the assumption that the underlying loopback interface is synchronous, i.e. as soon as a write succeeds, any corresponding reads will be ready. I've added info to the assert that will hopefully test this theory. Can you do a git pull and reproduce the failure again and post the traceback? |
|
For the record, I tried making the test assertion more specific, but it is difficult to come up with an assertion that accommodates the asynchronous behavior and isn't extremely brittle and specific. Given that I'm +1 on the change. |