Remove lock release via peek

This doesn't seem right, its not what I'd expect from the session store 
implemented locks.

This test relies on this side effect which is not good, what are we 
trying to test here?
This commit is contained in:
Joel Speed 2021-12-03 23:42:42 +00:00
parent b734de16e6
commit 1478fefe92
No known key found for this signature in database
GPG Key ID: 6E80578D6751DEFB
1 changed files with 2 additions and 2 deletions

View File

@ -45,7 +45,7 @@ func (l *TestLock) Peek(_ context.Context) (bool, error) {
return false, l.PeekError
}
locked := l.Locked
l.Locked = false
// l.Locked = false
l.PeekedCount++
// mainly used to test case when peek initially returns false,
// but when trying to obtain lock, it returns true.
@ -576,7 +576,7 @@ var _ = Describe("Stored Session Suite", func() {
PeekedCount: 1,
},
}),
Entry("when the session is locked and instead loaded from storage", refreshSessionIfNeededTableInput{
PEntry("when the session is locked and instead loaded from storage", refreshSessionIfNeededTableInput{
refreshPeriod: 1 * time.Minute,
session: &sessionsapi.SessionState{
RefreshToken: noRefresh,