Skip to content

Commit

Permalink
node: fix flaky jwt-test (ethereum#30388)
Browse files Browse the repository at this point in the history
This PR fixes a flaky jwt-test. 

The test is a jwt "from one second in the future". The test passes; the
reason for this is that the CI-system is slow, and by the time the jwt
is actually evaluated, that second has passed, and it's no longer
future.

Alternative to ethereum#30380
  • Loading branch information
holiman committed Sep 4, 2024
1 parent 7ef49e3 commit c3f13b2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion node/rpcstack_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@ func TestJWT(t *testing.T) {
expFail := []func() string{
// future
func() string {
return fmt.Sprintf("Bearer %v", issueToken(secret, nil, testClaim{"iat": time.Now().Unix() + int64(jwtExpiryTimeout.Seconds()) + 1}))
return fmt.Sprintf("Bearer %v", issueToken(secret, nil, testClaim{"iat": time.Now().Unix() + int64(jwtExpiryTimeout.Seconds()) + 60}))
},
// stale
func() string {
Expand Down

0 comments on commit c3f13b2

Please sign in to comment.