multi: add tatanka handler tests.#1
Conversation
| // Give push stream handler time to register | ||
| time.Sleep(100 * time.Millisecond) |
There was a problem hiding this comment.
Are these time.Sleeps necessary?
There was a problem hiding this comment.
yes, need to wait briefly for push streams to be created before topics can be registered. I'm updating the sleeps to use requireEventually which is more flexible.
There was a problem hiding this comment.
Maybe I'm reading this wrong, but wouldn't we want to move the response (WriteLengthPrefixedMessage) to the end of (*TatankaNode).handleClientPush to avoid the race condition altogether?
There was a problem hiding this comment.
Maybe I'm reading this wrong, but wouldn't we want to move the response (
WriteLengthPrefixedMessage) to the end of(*TatankaNode).handleClientPushto avoid the race condition altogether?
Am I wrong?
There was a problem hiding this comment.
No you're not, it'd be better to move the response after the push stream is created to avoid responses arriving before the push stream registration is done.
This adds tests for tatanka message handlers.
03253a3 to
d083730
Compare
d083730 to
5e721a2
Compare
This adds tests for tatanka message handlers.