diff --git a/common/geth/multihoming_client_test.go b/common/geth/multihoming_client_test.go index 2ce4371fb2..ee2ac9b0aa 100644 --- a/common/geth/multihoming_client_test.go +++ b/common/geth/multihoming_client_test.go @@ -4,6 +4,7 @@ import ( "context" "math/big" "testing" + "time" "github.com/Layr-Labs/eigenda/common/geth" damock "github.com/Layr-Labs/eigenda/common/mock" @@ -18,7 +19,7 @@ var ( rpcURLs = []string{"127.0.0.1", "127.0.0.2", "127.0.0.3"} ) -func makeTestMultihomingClient(t *testing.T, numRetries int) (*geth.MultiHomingClient, error) { +func makeTestMultihomingClient(numRetries int) (*geth.MultiHomingClient, error) { logger := logging.NewNoopLogger() ethClientCfg := geth.EthClientConfig{ @@ -26,6 +27,7 @@ func makeTestMultihomingClient(t *testing.T, numRetries int) (*geth.MultiHomingC PrivateKeyString: privateKey, NumConfirmations: 0, NumRetries: numRetries, + NetworkTimeout: time.Second, } mockClient := geth.MultiHomingClient{} @@ -54,7 +56,7 @@ func makeFailureCall(t *testing.T, client *geth.MultiHomingClient, numCall int) } func TestMultihomingClientZeroRetry(t *testing.T) { - client, _ := makeTestMultihomingClient(t, 0) + client, _ := makeTestMultihomingClient(0) index, _ := client.GetRPCInstance() require.Equal(t, index, 0) @@ -77,7 +79,7 @@ func TestMultihomingClientZeroRetry(t *testing.T) { } func TestMultihomingClientOneRetry(t *testing.T) { - client, _ := makeTestMultihomingClient(t, 1) + client, _ := makeTestMultihomingClient(1) index, _ := client.GetRPCInstance() require.Equal(t, index, 0) @@ -100,7 +102,7 @@ func TestMultihomingClientOneRetry(t *testing.T) { } func TestMultihomingClientTwoRetry(t *testing.T) { - client, _ := makeTestMultihomingClient(t, 2) + client, _ := makeTestMultihomingClient(2) index, _ := client.GetRPCInstance() require.Equal(t, index, 0) diff --git a/inabox/tests/integration_suite_test.go b/inabox/tests/integration_suite_test.go index fb405b048d..92ad69af0f 100644 --- a/inabox/tests/integration_suite_test.go +++ b/inabox/tests/integration_suite_test.go @@ -47,6 +47,8 @@ var ( mockRollup *rollupbindings.ContractMockRollup retrievalClient clients.RetrievalClient numConfirmations int = 3 + networkTimeout = 3 * time.Second + numRetries = 0 cancel context.CancelFunc ) @@ -122,6 +124,8 @@ var _ = BeforeSuite(func() { RPCURLs: []string{testConfig.Deployers[0].RPC}, PrivateKeyString: pk, NumConfirmations: numConfirmations, + NetworkTimeout: networkTimeout, + NumRetries: numRetries, }, logger) Expect(err).To(BeNil()) rpcClient, err = ethrpc.Dial(testConfig.Deployers[0].RPC) @@ -137,6 +141,8 @@ func setupRetrievalClient(testConfig *deploy.Config) error { RPCURLs: []string{testConfig.Deployers[0].RPC}, PrivateKeyString: "351b8eca372e64f64d514f90f223c5c4f86a04ff3dcead5c27293c547daab4ca", // just random private key NumConfirmations: numConfirmations, + NetworkTimeout: networkTimeout, + NumRetries: numRetries, } client, err := geth.NewMultiHomingClient(ethClientConfig, logger) if err != nil {