From d628ba6a9f85e469b70b2ad643018871503399c8 Mon Sep 17 00:00:00 2001 From: guillaumemichel Date: Thu, 22 Aug 2024 09:09:17 +0200 Subject: [PATCH] reverting changes on TestRTEvictionOnFailedQuery --- query_test.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/query_test.go b/query_test.go index ee4f8e1cc..91669641a 100644 --- a/query_test.go +++ b/query_test.go @@ -39,10 +39,10 @@ func TestRTEvictionOnFailedQuery(t *testing.T) { return nil })) - // clear the addresses of the peers so that the next queries fail - d1.host.Peerstore().ClearAddrs(d2.self) - d2.host.Peerstore().ClearAddrs(d1.self) - // peers will still be in the RT because RT is decoupled with the host and peerstore + // close both hosts so query fails + require.NoError(t, d1.host.Close()) + require.NoError(t, d2.host.Close()) + // peers will still be in the RT because we have decoupled membership from connectivity require.NoError(t, tu.WaitFor(ctx, func() error { if !checkRoutingTable(d1, d2) { return fmt.Errorf("should have routes")