[#1628] fixed realtime panic on concurrent clients iteration
This commit is contained in:
@@ -129,3 +129,17 @@ func TestSetAndGet(t *testing.T) {
|
||||
t.Errorf("Expected 1, got %v", result)
|
||||
}
|
||||
}
|
||||
|
||||
func TestDiscard(t *testing.T) {
|
||||
c := subscriptions.NewDefaultClient()
|
||||
|
||||
if v := c.IsDiscarded(); v {
|
||||
t.Fatal("Expected false, got true")
|
||||
}
|
||||
|
||||
c.Discard()
|
||||
|
||||
if v := c.IsDiscarded(); !v {
|
||||
t.Fatal("Expected true, got false")
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user