Skip to content

Commit 2d61480

Browse files
committed
fix: cicd
1 parent 233a7a5 commit 2d61480

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

.circleci/config.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,4 @@ workflows:
2626
jobs:
2727
- setup:
2828
filters:
29-
tags:
30-
only: /dev-v[0-9]+(\.[0-9]+)*/
31-
branches:
32-
ignore: /.*/
29+
branches: {}

recipe/session/recipeImplementation.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,10 @@ func getJWKSFromCacheIfPresent() *sessmodels.GetJWKSResult {
6363
// from the cores again after the entry in the cache is expired
6464
if (currentTime - jwksCache.LastFetched) < JWKCacheMaxAgeInMs {
6565
if supertokens.IsRunningInTestMode() {
66+
if len(returnedFromCache) == cap(returnedFromCache) { // need to clear the channel if full because it's not being consumed in the test
67+
close(returnedFromCache)
68+
returnedFromCache = make(chan bool, 1000)
69+
}
6670
returnedFromCache <- true
6771
}
6872

@@ -116,6 +120,10 @@ func getJWKS() (*keyfunc.JWKS, error) {
116120
jwksCache = &jwksResult
117121

118122
if supertokens.IsRunningInTestMode() {
123+
if len(returnedFromCache) == cap(returnedFromCache) { // need to clear the channel if full because it's not being consumed in the test
124+
close(returnedFromCache)
125+
returnedFromCache = make(chan bool, 1000)
126+
}
119127
returnedFromCache <- false
120128
}
121129

0 commit comments

Comments
 (0)