mirror of
https://github.com/logos-messaging/go-libp2p-rendezvous.git
synced 2026-01-02 12:53:13 +00:00
fix: test data race
Signed-off-by: gfanton <8671905+gfanton@users.noreply.github.com>
This commit is contained in:
parent
9135bf5c15
commit
2c25cf426d
@ -93,6 +93,8 @@ func TestClientRegistrationAndDiscovery(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestClientRegistrationAndDiscoveryAsync(t *testing.T) {
|
||||
DiscoverAsyncInterval = 1 * time.Second
|
||||
|
||||
ctx, cancel := context.WithCancel(context.Background())
|
||||
defer cancel()
|
||||
|
||||
@ -109,8 +111,6 @@ func TestClientRegistrationAndDiscoveryAsync(t *testing.T) {
|
||||
|
||||
clients := getRendezvousClients(t, hosts)
|
||||
|
||||
DiscoverAsyncInterval = 1 * time.Second
|
||||
|
||||
ch, err := clients[0].DiscoverAsync(ctx, "foo1")
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
@ -128,6 +128,4 @@ func TestClientRegistrationAndDiscoveryAsync(t *testing.T) {
|
||||
pi := <-ch
|
||||
checkPeerInfo(t, pi, hosts[1+i])
|
||||
}
|
||||
|
||||
DiscoverAsyncInterval = 2 * time.Minute
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user