fix: harden group lifecycle and registration writes
This commit is contained in:
@@ -613,6 +613,26 @@ func TestVideoCallStaleUnanswered(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestNormalizeCallEventAliases(t *testing.T) {
|
||||
for _, event := range []string{"hang-up", "hangup", "hang_up", "finish", "finished", "end", "ended", "disconnect", "disconnected"} {
|
||||
if got := normalizeCallEvent(event); got != constCallEventHangUp {
|
||||
t.Fatalf("normalizeCallEvent(%q) = %q, want %q", event, got, constCallEventHangUp)
|
||||
}
|
||||
if !isDetachedCallEvent(event) {
|
||||
t.Fatalf("isDetachedCallEvent(%q) = false, want true", event)
|
||||
}
|
||||
}
|
||||
if got := normalizeCallEvent(constCallEventAccept); got != constCallEventAccept {
|
||||
t.Fatalf("normalizeCallEvent(%q) = %q, want %q", constCallEventAccept, got, constCallEventAccept)
|
||||
}
|
||||
if !isDetachedCallEvent(constCallEventAccept) {
|
||||
t.Fatalf("isDetachedCallEvent(%q) = false, want true", constCallEventAccept)
|
||||
}
|
||||
if isDetachedCallEvent("unknown") {
|
||||
t.Fatal("isDetachedCallEvent(\"unknown\") = true, want false")
|
||||
}
|
||||
}
|
||||
|
||||
func TestHandleBroadcastDataGroup(t *testing.T) {
|
||||
topicName := "grp-test"
|
||||
numUsers := 4
|
||||
|
||||
Reference in New Issue
Block a user