From 760c0925e7b9a46e79ec30ed969d66e72f142843 Mon Sep 17 00:00:00 2001 From: Mantre Date: Tue, 9 Jan 2024 01:46:34 +0800 Subject: [PATCH] test(network): fixing random mDNS test failure (#919) --- network/network_test.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/network/network_test.go b/network/network_test.go index 3eac60009..ff5792217 100644 --- a/network/network_test.go +++ b/network/network_test.go @@ -69,6 +69,7 @@ func testConfig() *Config { NetworkKey: util.TempFilePath(), BootstrapAddrStrings: []string{}, MaxConns: 8, + EnableUDP: true, EnableNATService: false, EnableUPnP: false, EnableRelay: false, @@ -390,7 +391,6 @@ func TestConnections(t *testing.T) { for i, test := range tests { // Bootstrap node confB := testConfig() - confB.EnableUDP = true bootstrapPort := ts.RandInt32(9999) + 10000 bootstrapAddr := fmt.Sprintf(test.bootstrapAddr, bootstrapPort) confB.ListenAddrStrings = []string{bootstrapAddr} @@ -401,7 +401,6 @@ func TestConnections(t *testing.T) { // Public node confP := testConfig() - confP.EnableUDP = true confP.BootstrapAddrStrings = []string{ fmt.Sprintf("%s/p2p/%v", bootstrapAddr, networkB.SelfID().String()), }