From 60e41169f2e94708a6655b085eed87f903066a94 Mon Sep 17 00:00:00 2001 From: Piotr Nojszewski <29924594+AeonSw4n@users.noreply.github.com> Date: Mon, 29 Jan 2024 12:04:52 -0800 Subject: [PATCH] More renames --- ...st.go => network_manager_routines_test.go} | 54 ++++----- ...roller_test.go => network_manager_test.go} | 106 +++++++++--------- ..._test.go => network_manager_utils_test.go} | 0 3 files changed, 80 insertions(+), 80 deletions(-) rename integration_testing/{connection_controller_routines_test.go => network_manager_routines_test.go} (94%) rename integration_testing/{connection_controller_test.go => network_manager_test.go} (86%) rename integration_testing/{connection_controller_utils_test.go => network_manager_utils_test.go} (100%) diff --git a/integration_testing/connection_controller_routines_test.go b/integration_testing/network_manager_routines_test.go similarity index 94% rename from integration_testing/connection_controller_routines_test.go rename to integration_testing/network_manager_routines_test.go index c6c73e0e5..ed230b7c6 100644 --- a/integration_testing/connection_controller_routines_test.go +++ b/integration_testing/network_manager_routines_test.go @@ -323,8 +323,8 @@ func TestConnectionControllerValidatorInboundDeduplication(t *testing.T) { node2 = startNode(t, node2) node3 = startNode(t, node3) - cc2 := node2.Server.GetConnectionController() - require.NoError(t, cc2.CreateNonValidatorOutboundConnection(node1.Listeners[0].Addr().String())) + nm2 := node2.Server.GetConnectionController() + require.NoError(t, nm2.CreateNonValidatorOutboundConnection(node1.Listeners[0].Addr().String())) // First wait for node2 to be indexed as a validator by node1. waitForValidatorConnection(t, node1, node2) // Now wait for node2 to be re-indexed as a non-validator. @@ -332,8 +332,8 @@ func TestConnectionControllerValidatorInboundDeduplication(t *testing.T) { waitForNonValidatorOutboundConnection(t, node2, node1) // Now connect node3 to node1. - cc3 := node3.Server.GetConnectionController() - require.NoError(t, cc3.CreateNonValidatorOutboundConnection(node1.Listeners[0].Addr().String())) + nm3 := node3.Server.GetConnectionController() + require.NoError(t, nm3.CreateNonValidatorOutboundConnection(node1.Listeners[0].Addr().String())) // First wait for node3 to be indexed as a validator by node1. waitForValidatorConnection(t, node1, node3) // Now wait for node3 to be re-indexed as a non-validator. @@ -373,9 +373,9 @@ func TestConnectionControllerNonValidatorConnectorOutbound(t *testing.T) { } node1 = startNode(t, node1) - cc := node1.Server.GetConnectionController() - require.NoError(t, cc.CreateNonValidatorOutboundConnection(node5.Listeners[0].Addr().String())) - require.NoError(t, cc.CreateNonValidatorOutboundConnection(node6.Listeners[0].Addr().String())) + nm := node1.Server.GetConnectionController() + require.NoError(t, nm.CreateNonValidatorOutboundConnection(node5.Listeners[0].Addr().String())) + require.NoError(t, nm.CreateNonValidatorOutboundConnection(node6.Listeners[0].Addr().String())) waitForCountRemoteNodeIndexerHandshakeCompleted(t, node1, 3, 0, 3, 0) waitForNonValidatorOutboundConnection(t, node1, node2) @@ -435,24 +435,24 @@ func TestConnectionControllerNonValidatorConnectorInbound(t *testing.T) { node10 = startNode(t, node10) // Connect node1 to node2, node3, node7, and node8. - cc1 := node1.Server.GetConnectionController() - require.NoError(t, cc1.CreateNonValidatorOutboundConnection(node2.Listeners[0].Addr().String())) - require.NoError(t, cc1.CreateNonValidatorOutboundConnection(node3.Listeners[0].Addr().String())) - require.NoError(t, cc1.CreateNonValidatorOutboundConnection(node7.Listeners[0].Addr().String())) - require.NoError(t, cc1.CreateNonValidatorOutboundConnection(node8.Listeners[0].Addr().String())) + nm1 := node1.Server.GetConnectionController() + require.NoError(t, nm1.CreateNonValidatorOutboundConnection(node2.Listeners[0].Addr().String())) + require.NoError(t, nm1.CreateNonValidatorOutboundConnection(node3.Listeners[0].Addr().String())) + require.NoError(t, nm1.CreateNonValidatorOutboundConnection(node7.Listeners[0].Addr().String())) + require.NoError(t, nm1.CreateNonValidatorOutboundConnection(node8.Listeners[0].Addr().String())) // Connect node4, node5, node6 to node1. - cc4 := node4.Server.GetConnectionController() - require.NoError(t, cc4.CreateNonValidatorOutboundConnection(node1.Listeners[0].Addr().String())) - cc5 := node5.Server.GetConnectionController() - require.NoError(t, cc5.CreateNonValidatorOutboundConnection(node1.Listeners[0].Addr().String())) - cc6 := node6.Server.GetConnectionController() - require.NoError(t, cc6.CreateNonValidatorOutboundConnection(node1.Listeners[0].Addr().String())) + nm4 := node4.Server.GetConnectionController() + require.NoError(t, nm4.CreateNonValidatorOutboundConnection(node1.Listeners[0].Addr().String())) + nm5 := node5.Server.GetConnectionController() + require.NoError(t, nm5.CreateNonValidatorOutboundConnection(node1.Listeners[0].Addr().String())) + nm6 := node6.Server.GetConnectionController() + require.NoError(t, nm6.CreateNonValidatorOutboundConnection(node1.Listeners[0].Addr().String())) // Connect node9, node10 to node1. - cc9 := node9.Server.GetConnectionController() - require.NoError(t, cc9.CreateNonValidatorOutboundConnection(node1.Listeners[0].Addr().String())) - cc10 := node10.Server.GetConnectionController() - require.NoError(t, cc10.CreateNonValidatorOutboundConnection(node1.Listeners[0].Addr().String())) + nm9 := node9.Server.GetConnectionController() + require.NoError(t, nm9.CreateNonValidatorOutboundConnection(node1.Listeners[0].Addr().String())) + nm10 := node10.Server.GetConnectionController() + require.NoError(t, nm10.CreateNonValidatorOutboundConnection(node1.Listeners[0].Addr().String())) activeValidatorsMap := getActiveValidatorsMapWithValidatorNodes(t, node1, node2, node3, node4, node5, node6) setActiveValidators(activeValidatorsMap, node1, node2, node3, node4, node5, node6, node7, node8, node9, node10) @@ -473,12 +473,12 @@ func TestConnectionControllerNonValidatorConnectorAddressMgr(t *testing.T) { node1.Config.MaxInboundPeers = 0 node1 = startNode(t, node1) - cc := node1.Server.GetConnectionController() - na1, err := cc.ConvertIPStringToNetAddress("deso-seed-2.io:17000") - na2, err := cc.ConvertIPStringToNetAddress("deso-seed-3.io:17000") + nm := node1.Server.GetConnectionController() + na1, err := nm.ConvertIPStringToNetAddress("deso-seed-2.io:17000") + na2, err := nm.ConvertIPStringToNetAddress("deso-seed-3.io:17000") require.NoError(t, err) - cc.AddrMgr.AddAddress(na1, na1) - cc.AddrMgr.AddAddress(na2, na2) + nm.AddrMgr.AddAddress(na1, na1) + nm.AddrMgr.AddAddress(na2, na2) waitForCountRemoteNodeIndexer(t, node1, 2, 0, 2, 0) } diff --git a/integration_testing/connection_controller_test.go b/integration_testing/network_manager_test.go similarity index 86% rename from integration_testing/connection_controller_test.go rename to integration_testing/network_manager_test.go index 63976fbd4..cac938f76 100644 --- a/integration_testing/connection_controller_test.go +++ b/integration_testing/network_manager_test.go @@ -18,8 +18,8 @@ func TestConnectionControllerNonValidator(t *testing.T) { node2.Params.DisableNetworkManagerRoutines = true node2 = startNode(t, node2) - cc := node1.Server.GetConnectionController() - require.NoError(t, cc.CreateNonValidatorOutboundConnection(node2.Listeners[0].Addr().String())) + nm := node1.Server.GetConnectionController() + require.NoError(t, nm.CreateNonValidatorOutboundConnection(node2.Listeners[0].Addr().String())) waitForNonValidatorOutboundConnection(t, node1, node2) waitForNonValidatorInboundConnection(t, node2, node1) @@ -34,8 +34,8 @@ func TestConnectionControllerNonValidator(t *testing.T) { node3.Params.DisableNetworkManagerRoutines = true node3 = startNode(t, node3) - cc = node1.Server.GetConnectionController() - require.NoError(t, cc.CreateNonValidatorOutboundConnection(node3.Listeners[0].Addr().String())) + nm = node1.Server.GetConnectionController() + require.NoError(t, nm.CreateNonValidatorOutboundConnection(node3.Listeners[0].Addr().String())) waitForValidatorConnection(t, node1, node3) waitForNonValidatorInboundConnection(t, node3, node1) @@ -50,8 +50,8 @@ func TestConnectionControllerNonValidator(t *testing.T) { node4.Params.DisableNetworkManagerRoutines = true node4 = startNode(t, node4) - cc = node1.Server.GetConnectionController() - require.NoError(t, cc.CreateNonValidatorOutboundConnection(node4.Listeners[0].Addr().String())) + nm = node1.Server.GetConnectionController() + require.NoError(t, nm.CreateNonValidatorOutboundConnection(node4.Listeners[0].Addr().String())) waitForValidatorConnection(t, node1, node4) waitForNonValidatorInboundConnection(t, node4, node1) t.Logf("Test #3 passed | Successfully created outbound connection from NonValidator Node1 to Validator Node4") @@ -74,8 +74,8 @@ func TestConnectionControllerValidator(t *testing.T) { node2.Params.DisableNetworkManagerRoutines = true node2 = startNode(t, node2) - cc := node1.Server.GetConnectionController() - require.NoError(t, cc.CreateValidatorConnection(node2.Listeners[0].Addr().String(), blsPub2)) + nm := node1.Server.GetConnectionController() + require.NoError(t, nm.CreateValidatorConnection(node2.Listeners[0].Addr().String(), blsPub2)) waitForValidatorConnection(t, node1, node2) waitForValidatorConnection(t, node2, node1) @@ -88,8 +88,8 @@ func TestConnectionControllerValidator(t *testing.T) { node3.Params.DisableNetworkManagerRoutines = true node3 = startNode(t, node3) - cc = node1.Server.GetConnectionController() - require.NoError(t, cc.CreateNonValidatorOutboundConnection(node3.Listeners[0].Addr().String())) + nm = node1.Server.GetConnectionController() + require.NoError(t, nm.CreateNonValidatorOutboundConnection(node3.Listeners[0].Addr().String())) waitForNonValidatorOutboundConnection(t, node1, node3) waitForValidatorConnection(t, node3, node1) @@ -104,8 +104,8 @@ func TestConnectionControllerValidator(t *testing.T) { node4.Params.DisableNetworkManagerRoutines = true node4 = startNode(t, node4) - cc = node1.Server.GetConnectionController() - require.NoError(t, cc.CreateNonValidatorOutboundConnection(node4.Listeners[0].Addr().String())) + nm = node1.Server.GetConnectionController() + require.NoError(t, nm.CreateNonValidatorOutboundConnection(node4.Listeners[0].Addr().String())) waitForValidatorConnection(t, node1, node4) waitForValidatorConnection(t, node4, node1) t.Logf("Test #3 passed | Successfully created non-validator outbound connection from Validator Node1 to Validator Node4") @@ -127,8 +127,8 @@ func TestConnectionControllerHandshakeDataErrors(t *testing.T) { node1 = startNode(t, node1) node2 = startNode(t, node2) - cc := node2.Server.GetConnectionController() - require.NoError(t, cc.CreateNonValidatorOutboundConnection(node1.Listeners[0].Addr().String())) + nm := node2.Server.GetConnectionController() + require.NoError(t, nm.CreateNonValidatorOutboundConnection(node1.Listeners[0].Addr().String())) waitForEmptyRemoteNodeIndexer(t, node1) waitForEmptyRemoteNodeIndexer(t, node2) t.Logf("Test #1 passed | Successfuly disconnected node with SFValidator flag and ProtocolVersion1 mismatch") @@ -141,8 +141,8 @@ func TestConnectionControllerHandshakeDataErrors(t *testing.T) { node3.Params.ProtocolVersion = lib.ProtocolVersionType(3) node3 = startNode(t, node3) - cc = node1.Server.GetConnectionController() - require.NoError(t, cc.CreateNonValidatorOutboundConnection(node3.Listeners[0].Addr().String())) + nm = node1.Server.GetConnectionController() + require.NoError(t, nm.CreateNonValidatorOutboundConnection(node3.Listeners[0].Addr().String())) waitForEmptyRemoteNodeIndexer(t, node1) waitForEmptyRemoteNodeIndexer(t, node3) t.Logf("Test #2 passed | Successfuly disconnected node with ProtocolVersion3") @@ -153,8 +153,8 @@ func TestConnectionControllerHandshakeDataErrors(t *testing.T) { node4.Params.ProtocolVersion = lib.ProtocolVersion0 node4 = startNode(t, node4) - cc = node1.Server.GetConnectionController() - require.NoError(t, cc.CreateNonValidatorOutboundConnection(node4.Listeners[0].Addr().String())) + nm = node1.Server.GetConnectionController() + require.NoError(t, nm.CreateNonValidatorOutboundConnection(node4.Listeners[0].Addr().String())) waitForEmptyRemoteNodeIndexer(t, node1) waitForEmptyRemoteNodeIndexer(t, node4) t.Logf("Test #3 passed | Successfuly disconnected node with ProtocolVersion0") @@ -170,8 +170,8 @@ func TestConnectionControllerHandshakeDataErrors(t *testing.T) { node5.Params.DisableNetworkManagerRoutines = true node5 = startNode(t, node5) - cc = node1.Server.GetConnectionController() - require.NoError(t, cc.CreateValidatorConnection(node5.Listeners[0].Addr().String(), blsKeyStore5Wrong.GetSigner().GetPublicKey())) + nm = node1.Server.GetConnectionController() + require.NoError(t, nm.CreateValidatorConnection(node5.Listeners[0].Addr().String(), blsKeyStore5Wrong.GetSigner().GetPublicKey())) waitForEmptyRemoteNodeIndexer(t, node1) waitForEmptyRemoteNodeIndexer(t, node5) t.Logf("Test #4 passed | Successfuly disconnected node with public key mismatch") @@ -183,8 +183,8 @@ func TestConnectionControllerHandshakeDataErrors(t *testing.T) { node6.Params.DisableNetworkManagerRoutines = true node6 = startNode(t, node6) - cc = node1.Server.GetConnectionController() - require.NoError(t, cc.CreateValidatorConnection(node6.Listeners[0].Addr().String(), blsPriv6.PublicKey())) + nm = node1.Server.GetConnectionController() + require.NoError(t, nm.CreateValidatorConnection(node6.Listeners[0].Addr().String(), blsPriv6.PublicKey())) waitForEmptyRemoteNodeIndexer(t, node1) waitForEmptyRemoteNodeIndexer(t, node6) t.Logf("Test #5 passed | Successfuly disconnected supposed validator node with missing SFPosValidator flag") @@ -195,8 +195,8 @@ func TestConnectionControllerHandshakeDataErrors(t *testing.T) { node7.Params.ProtocolVersion = lib.ProtocolVersion1 node7 = startNode(t, node7) - cc = node1.Server.GetConnectionController() - require.NoError(t, cc.CreateNonValidatorOutboundConnection(node7.Listeners[0].Addr().String())) + nm = node1.Server.GetConnectionController() + require.NoError(t, nm.CreateNonValidatorOutboundConnection(node7.Listeners[0].Addr().String())) waitForEmptyRemoteNodeIndexer(t, node1) waitForEmptyRemoteNodeIndexer(t, node7) t.Logf("Test #6 passed | Successfuly disconnected outbound non-validator node with ProtocolVersion1") @@ -213,8 +213,8 @@ func TestConnectionControllerHandshakeTimeouts(t *testing.T) { node2.Params.DisableNetworkManagerRoutines = true node2 = startNode(t, node2) - cc := node1.Server.GetConnectionController() - require.NoError(t, cc.CreateNonValidatorOutboundConnection(node2.Listeners[0].Addr().String())) + nm := node1.Server.GetConnectionController() + require.NoError(t, nm.CreateNonValidatorOutboundConnection(node2.Listeners[0].Addr().String())) waitForEmptyRemoteNodeIndexer(t, node1) waitForEmptyRemoteNodeIndexer(t, node2) t.Logf("Test #1 passed | Successfuly disconnected node after version negotiation timeout") @@ -226,8 +226,8 @@ func TestConnectionControllerHandshakeTimeouts(t *testing.T) { node3.Params.VerackNegotiationTimeout = 0 node3 = startNode(t, node3) - cc = node3.Server.GetConnectionController() - require.NoError(t, cc.CreateNonValidatorOutboundConnection(node1.Listeners[0].Addr().String())) + nm = node3.Server.GetConnectionController() + require.NoError(t, nm.CreateNonValidatorOutboundConnection(node1.Listeners[0].Addr().String())) waitForEmptyRemoteNodeIndexer(t, node1) waitForEmptyRemoteNodeIndexer(t, node3) t.Logf("Test #2 passed | Successfuly disconnected node after verack exchange timeout") @@ -248,8 +248,8 @@ func TestConnectionControllerHandshakeTimeouts(t *testing.T) { node5.Params.DisableNetworkManagerRoutines = true node5 = startNode(t, node5) - cc = node4.Server.GetConnectionController() - require.NoError(t, cc.CreateValidatorConnection(node5.Listeners[0].Addr().String(), blsKeyStore5.GetSigner().GetPublicKey())) + nm = node4.Server.GetConnectionController() + require.NoError(t, nm.CreateValidatorConnection(node5.Listeners[0].Addr().String(), blsKeyStore5.GetSigner().GetPublicKey())) waitForEmptyRemoteNodeIndexer(t, node4) waitForEmptyRemoteNodeIndexer(t, node5) t.Logf("Test #3 passed | Successfuly disconnected validator node after handshake timeout") @@ -275,17 +275,17 @@ func TestConnectionControllerValidatorDuplication(t *testing.T) { node3 = startNode(t, node3) // Create validator connection from Node1 to Node2 and from Node1 to Node3 - cc := node1.Server.GetConnectionController() - require.NoError(t, cc.CreateValidatorConnection(node2.Listeners[0].Addr().String(), blsKeyStore2.GetSigner().GetPublicKey())) + nm := node1.Server.GetConnectionController() + require.NoError(t, nm.CreateValidatorConnection(node2.Listeners[0].Addr().String(), blsKeyStore2.GetSigner().GetPublicKey())) // This should fail out right because Node3 has a duplicate public key. - require.Error(t, cc.CreateValidatorConnection(node3.Listeners[0].Addr().String(), blsKeyStore2.GetSigner().GetPublicKey())) + require.Error(t, nm.CreateValidatorConnection(node3.Listeners[0].Addr().String(), blsKeyStore2.GetSigner().GetPublicKey())) waitForValidatorConnection(t, node1, node2) waitForNonValidatorInboundConnection(t, node2, node1) // Now create an outbound connection from Node3 to Node1, which should pass handshake, but then fail because // Node1 already has a validator connection to Node2 with the same public key. - cc3 := node3.Server.GetConnectionController() - require.NoError(t, cc3.CreateNonValidatorOutboundConnection(node1.Listeners[0].Addr().String())) + nm3 := node3.Server.GetConnectionController() + require.NoError(t, nm3.CreateNonValidatorOutboundConnection(node1.Listeners[0].Addr().String())) waitForEmptyRemoteNodeIndexer(t, node3) waitForCountRemoteNodeIndexer(t, node1, 1, 1, 0, 0) t.Logf("Test #1 passed | Successfuly rejected duplicate validator connection with inbound/outbound validators") @@ -306,12 +306,12 @@ func TestConnectionControllerValidatorDuplication(t *testing.T) { node5 = startNode(t, node5) // Create validator connections from Node4 to Node1 and from Node5 to Node1 - cc4 := node4.Server.GetConnectionController() - require.NoError(t, cc4.CreateNonValidatorOutboundConnection(node1.Listeners[0].Addr().String())) + nm4 := node4.Server.GetConnectionController() + require.NoError(t, nm4.CreateNonValidatorOutboundConnection(node1.Listeners[0].Addr().String())) waitForValidatorConnection(t, node1, node4) waitForNonValidatorOutboundConnection(t, node4, node1) - cc5 := node5.Server.GetConnectionController() - require.NoError(t, cc5.CreateNonValidatorOutboundConnection(node1.Listeners[0].Addr().String())) + nm5 := node5.Server.GetConnectionController() + require.NoError(t, nm5.CreateNonValidatorOutboundConnection(node1.Listeners[0].Addr().String())) waitForEmptyRemoteNodeIndexer(t, node5) waitForCountRemoteNodeIndexer(t, node1, 1, 1, 0, 0) t.Logf("Test #2 passed | Successfuly rejected duplicate validator connection with multiple outbound validators") @@ -330,8 +330,8 @@ func TestConnectionControllerProtocolDifference(t *testing.T) { node2 = startNode(t, node2) // Create non-validator connection from Node1 to Node2 - cc := node1.Server.GetConnectionController() - require.NoError(t, cc.CreateNonValidatorOutboundConnection(node2.Listeners[0].Addr().String())) + nm := node1.Server.GetConnectionController() + require.NoError(t, nm.CreateNonValidatorOutboundConnection(node2.Listeners[0].Addr().String())) waitForNonValidatorOutboundConnection(t, node1, node2) waitForNonValidatorInboundConnection(t, node2, node1) t.Logf("Test #1 passed | Successfuly connected to a ProtocolVersion1 node with a ProtocolVersion2 non-validator") @@ -346,7 +346,7 @@ func TestConnectionControllerProtocolDifference(t *testing.T) { node3 = startNode(t, node3) // Create validator connection from Node1 to Node3 - require.NoError(t, cc.CreateValidatorConnection(node3.Listeners[0].Addr().String(), blsKeyStore3.GetSigner().GetPublicKey())) + require.NoError(t, nm.CreateValidatorConnection(node3.Listeners[0].Addr().String(), blsKeyStore3.GetSigner().GetPublicKey())) waitForValidatorConnection(t, node1, node3) waitForNonValidatorInboundConnection(t, node3, node1) t.Logf("Test #2 passed | Successfuly connected to a ProtocolVersion1 node with a ProtocolVersion2 validator") @@ -365,14 +365,14 @@ func TestConnectionControllerProtocolDifference(t *testing.T) { node4 = startNode(t, node4) // Attempt to create non-validator connection from Node4 to Node1 - cc = node4.Server.GetConnectionController() - require.NoError(t, cc.CreateNonValidatorOutboundConnection(node1.Listeners[0].Addr().String())) + nm = node4.Server.GetConnectionController() + require.NoError(t, nm.CreateNonValidatorOutboundConnection(node1.Listeners[0].Addr().String())) waitForEmptyRemoteNodeIndexer(t, node4) waitForEmptyRemoteNodeIndexer(t, node1) t.Logf("Test #3 passed | Successfuly rejected outbound connection from ProtocolVersion2 node to ProtcolVersion1 node") // Attempt to create validator connection from Node4 to Node1 - require.NoError(t, cc.CreateValidatorConnection(node1.Listeners[0].Addr().String(), blsKeyStore4.GetSigner().GetPublicKey())) + require.NoError(t, nm.CreateValidatorConnection(node1.Listeners[0].Addr().String(), blsKeyStore4.GetSigner().GetPublicKey())) waitForEmptyRemoteNodeIndexer(t, node4) waitForEmptyRemoteNodeIndexer(t, node1) t.Logf("Test #4 passed | Successfuly rejected validator connection from ProtocolVersion2 node to ProtcolVersion1 node") @@ -383,8 +383,8 @@ func TestConnectionControllerProtocolDifference(t *testing.T) { node5 = startNode(t, node5) // Attempt to create non-validator connection from Node5 to Node1 - cc = node5.Server.GetConnectionController() - require.NoError(t, cc.CreateNonValidatorOutboundConnection(node1.Listeners[0].Addr().String())) + nm = node5.Server.GetConnectionController() + require.NoError(t, nm.CreateNonValidatorOutboundConnection(node1.Listeners[0].Addr().String())) waitForEmptyRemoteNodeIndexer(t, node5) waitForEmptyRemoteNodeIndexer(t, node1) t.Logf("Test #5 passed | Successfuly rejected outbound connection from ProtocolVersion2 node to ProtcolVersion1 node") @@ -404,8 +404,8 @@ func TestConnectionControllerPersistentConnection(t *testing.T) { node2 = startNode(t, node2) // Create a persistent connection from Node1 to Node2 - cc := node1.Server.GetConnectionController() - _, err = cc.CreateNonValidatorPersistentOutboundConnection(node2.Listeners[0].Addr().String()) + nm := node1.Server.GetConnectionController() + _, err = nm.CreateNonValidatorPersistentOutboundConnection(node2.Listeners[0].Addr().String()) require.NoError(t, err) waitForValidatorConnection(t, node1, node2) waitForNonValidatorInboundConnection(t, node2, node1) @@ -419,7 +419,7 @@ func TestConnectionControllerPersistentConnection(t *testing.T) { node3 = startNode(t, node3) // Create a persistent connection from Node1 to Node3 - _, err = cc.CreateNonValidatorPersistentOutboundConnection(node3.Listeners[0].Addr().String()) + _, err = nm.CreateNonValidatorPersistentOutboundConnection(node3.Listeners[0].Addr().String()) require.NoError(t, err) waitForNonValidatorOutboundConnection(t, node1, node3) waitForNonValidatorInboundConnection(t, node3, node1) @@ -441,8 +441,8 @@ func TestConnectionControllerPersistentConnection(t *testing.T) { node5 = startNode(t, node5) // Create a persistent connection from Node4 to Node5 - cc = node4.Server.GetConnectionController() - _, err = cc.CreateNonValidatorPersistentOutboundConnection(node5.Listeners[0].Addr().String()) + nm = node4.Server.GetConnectionController() + _, err = nm.CreateNonValidatorPersistentOutboundConnection(node5.Listeners[0].Addr().String()) require.NoError(t, err) waitForNonValidatorOutboundConnection(t, node4, node5) waitForValidatorConnection(t, node5, node4) @@ -458,7 +458,7 @@ func TestConnectionControllerPersistentConnection(t *testing.T) { node6 = startNode(t, node6) // Create a persistent connection from Node4 to Node6 - _, err = cc.CreateNonValidatorPersistentOutboundConnection(node6.Listeners[0].Addr().String()) + _, err = nm.CreateNonValidatorPersistentOutboundConnection(node6.Listeners[0].Addr().String()) require.NoError(t, err) waitForValidatorConnection(t, node4, node6) waitForValidatorConnection(t, node6, node4) diff --git a/integration_testing/connection_controller_utils_test.go b/integration_testing/network_manager_utils_test.go similarity index 100% rename from integration_testing/connection_controller_utils_test.go rename to integration_testing/network_manager_utils_test.go