test: fix flaky example test

If we run the listener async, we might get expected events out of order.
This commit is contained in:
Steven Allen
2021-07-22 14:46:15 -07:00
parent 5d3b015018
commit a060bf9eba
2 changed files with 5 additions and 6 deletions

View File

@@ -43,7 +43,7 @@ func TestMain(t *testing.T) {
return
}
go runListener(ctx, lh, lport, true)
startListener(ctx, lh, lport, true)
// Make sender
listenAddr := getHostAddress(lh)