mirror of
https://github.com/pocketbase/pocketbase.git
synced 2026-10-29 16:30:25 +01:00
[#1628] fixed realtime panic on concurrent clients iteration
This commit is contained in:
1 parent
c1921aeef8
commit
7001a22d92
6 files changed
+101
-13
No files matched your search
@@ -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