Fixed flappers

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
This commit is contained in:
Ivan Kozlovic
2021-05-10 16:54:33 -06:00
parent 09c4f5841c
commit 25bf470363
2 changed files with 30 additions and 16 deletions

View File

@@ -1852,10 +1852,14 @@ func TestServiceLatencyMissingResults(t *testing.T) {
defer sub.Unsubscribe()
// Create sync listener for latency.
lsub, _ := nc1.SubscribeSync("service.weather.latency")
latSubj := "service.weather.latency"
lsub, _ := nc1.SubscribeSync(latSubj)
defer lsub.Unsubscribe()
nc1.Flush()
// Make sure the subscription propagates to s2 server.
checkSubInterest(t, s2, "weather", latSubj, time.Second)
// Create requestor on s2.
nc2, err := nats.Connect(fmt.Sprintf("nats://%s:%s@%s:%d", "one", "password", opts2.Host, opts2.Port), nats.UseOldRequestStyle())
if err != nil {