test(jitsi): guard session type assertions in tests

This commit is contained in:
zarazaex69
2026-05-16 18:38:14 +03:00
parent a329b1fd56
commit 07b86a7559

View File

@@ -198,7 +198,10 @@ func TestBridgeCloseRequestsReconnect(t *testing.T) {
}
defer func() { _ = sess.Close() }()
js := sess.(*Session)
js, ok := sess.(*Session)
if !ok {
t.Fatal("sess is not *Session")
}
var ended string
js.SetEndedCallback(func(reason string) { ended = reason })
js.SetShouldReconnect(func() bool { return true })
@@ -226,7 +229,10 @@ func TestBridgeCloseEndsWhenReconnectDisabled(t *testing.T) {
}
defer func() { _ = sess.Close() }()
js := sess.(*Session)
js, ok := sess.(*Session)
if !ok {
t.Fatal("sess is not *Session")
}
var ended string
js.SetEndedCallback(func(reason string) { ended = reason })
js.SetShouldReconnect(func() bool { return false })