Conversation
|
|
||
| std::string inprocLabel = "direct-test"; | ||
|
|
||
| AsyncDirectSendEndpoint sender(inprocLabel, TEST_PORT); |
There was a problem hiding this comment.
Afaict TEST_PORT here is passed as the timeoutMs argument.
| } | ||
|
|
||
| // Make main thread wait until messages are queued | ||
| if (i == 10) { |
There was a problem hiding this comment.
Why do we need to wait for messages to be queued? Does this mean the receiver thread won't block waiting for messages to be in place?
There was a problem hiding this comment.
The receiver thread will block, it's just that under the hood the receiver is doing the bind and the sender is doing a connect. This test forces the sender to do a connect and send messages before the recevier binds (which doesn't work for certain types of sockets IIRC). Have added a comment in the code to this effect.
| REQUIRE(actual == expected); | ||
| } | ||
|
|
||
| TEST_CASE_METHOD(SchedulerTestFixture, |
There was a problem hiding this comment.
For my particular use case, I'd be interested in seeing a stress test with various threads producing and various threads consuming to different in proc labels (each producer matched to one consumer).
Feel free to ignore, but I think it could be a relevant stress test.
There was a problem hiding this comment.
Yes good idea, have updated.
Wrapper around 0MQ PAIR sockets