File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -20,12 +20,14 @@ func TestContinuousRefreshToken(t *testing.T) {
2020 // For this to work, we need to increase precision of the expiration timestamps
2121 jwt .TimePrecision = time .Millisecond
2222
23- // Set up timing for the test
24- accessTokensTimeToLive := 1 * time .Second
23+ // Refresher settings
2524 timeStartBeforeTokenExpiration := 500 * time .Millisecond
2625 timeBetweenContextCheck := 10 * time .Millisecond
2726 timeBetweenTries := 100 * time .Millisecond
2827
28+ // All generated acess tokens will have this time to live
29+ accessTokensTimeToLive := 1 * time .Second
30+
2931 tests := []struct {
3032 desc string
3133 contextClosesIn time.Duration
@@ -212,7 +214,7 @@ func TestContinuousRefreshTokenConcurrency(t *testing.T) {
212214
213215 // The access token at the start
214216 accessTokenFirst , err := jwt .NewWithClaims (jwt .SigningMethodHS256 , jwt.RegisteredClaims {
215- ExpiresAt : jwt .NewNumericDate (time .Now ().Add (10 * time .Second )), // Much longer expiration
217+ ExpiresAt : jwt .NewNumericDate (time .Now ().Add (10 * time .Second )),
216218 }).SignedString ([]byte ("token-first" ))
217219 if err != nil {
218220 t .Fatalf ("failed to create first access token: %v" , err )
You can’t perform that action at this time.
0 commit comments