Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
giskook committed Jan 24, 2025
1 parent 4f2c358 commit 7549e6b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions rpc/batch_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
"net/http"
"net/http/httptest"
"testing"
"time"

"github.com/0xPolygon/cdk-rpc/rpc"
"github.com/ethereum/go-ethereum/common"
Expand Down Expand Up @@ -263,7 +264,7 @@ func Test_getGetL2BlockTimestampNull(t *testing.T) {
jSONRPCCall = func(_, _ string, _ ...interface{}) (rpc.Response, error) {
return response, nil
}
sut := NewBatchEndpoints("http://localhost:8080")
sut := NewBatchEndpoints("http://localhost:8080", 30*time.Second)
timestamp, err := sut.GetL2BlockTimestamp("0x123456")
require.Error(t, err)
require.Equal(t, uint64(0), timestamp)
Expand All @@ -277,7 +278,7 @@ func Test_getGetL2BlockTimestampZero(t *testing.T) {
jSONRPCCall = func(_, _ string, _ ...interface{}) (rpc.Response, error) {
return response, nil
}
sut := NewBatchEndpoints("http://localhost:8080")
sut := NewBatchEndpoints("http://localhost:8080", 30*time.Second)
timestamp, err := sut.GetL2BlockTimestamp("0x123456")
require.Error(t, err)
require.Equal(t, uint64(0), timestamp)
Expand Down

0 comments on commit 7549e6b

Please sign in to comment.