Skip to content

Commit c3f13b2

Browse files
authored
node: fix flaky jwt-test (ethereum#30388)
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
1 parent 7ef49e3 commit c3f13b2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

node/rpcstack_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,7 @@ func TestJWT(t *testing.T) {
383383
expFail := []func() string{
384384
// future
385385
func() string {
386-
return fmt.Sprintf("Bearer %v", issueToken(secret, nil, testClaim{"iat": time.Now().Unix() + int64(jwtExpiryTimeout.Seconds()) + 1}))
386+
return fmt.Sprintf("Bearer %v", issueToken(secret, nil, testClaim{"iat": time.Now().Unix() + int64(jwtExpiryTimeout.Seconds()) + 60}))
387387
},
388388
// stale
389389
func() string {

0 commit comments

Comments
 (0)