Tests for UnSet
This commit is contained in:
@@ -14,5 +14,5 @@ jobs:
|
||||
with:
|
||||
go-version: '1.19'
|
||||
- run: go get -t -v ./...
|
||||
- run: go test -race -coverprofile=coverage.out -covermode=atomic
|
||||
- run: go test -race -coverprofile=coverage.out -covermode=atomic -timeout 5s
|
||||
- uses: codecov/codecov-action@v3
|
||||
|
||||
@@ -661,6 +661,7 @@ func TestSessionKeysConcurrent(t *testing.T) {
|
||||
|
||||
go func() {
|
||||
s.Set("test", TestMsg)
|
||||
|
||||
v1, exists := s.Get("test")
|
||||
|
||||
assert.True(t, exists)
|
||||
@@ -675,6 +676,22 @@ func TestSessionKeysConcurrent(t *testing.T) {
|
||||
}
|
||||
|
||||
wg.Wait()
|
||||
|
||||
for i := 0; i < 100; i++ {
|
||||
wg.Add(1)
|
||||
|
||||
go func() {
|
||||
s.UnSet("test")
|
||||
|
||||
_, exists := s.Get("test")
|
||||
|
||||
assert.False(t, exists)
|
||||
|
||||
wg.Done()
|
||||
}()
|
||||
}
|
||||
|
||||
wg.Wait()
|
||||
}
|
||||
|
||||
func TestMisc(t *testing.T) {
|
||||
|
||||
Reference in New Issue
Block a user