Simplify loopback NATS client.

Only use one goroutine per client instead of one per subscription.
This ensures that (like with the "real" client), all messages are
processed in order across different subscriptions.
This commit is contained in:
Joachim Bauch
2021-06-07 16:53:26 +02:00
parent fe95626f3b
commit c8886d03c9
5 changed files with 80 additions and 79 deletions
+1 -1
View File
@@ -90,7 +90,7 @@ func testNatsClient_Subscribe(t *testing.T, client NatsClient) {
}
// Allow NATS goroutines to process messages.
time.Sleep(time.Millisecond)
time.Sleep(10 * time.Millisecond)
}
<-ch