test: give mock participants a connection quality, close test rooms (#4933)
* test: give mock participants a connection quality A real participant never returns a nil connection quality. The mock did, which can crash code that does not expect nil. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * test: close test rooms when each test ends Most room tests left their rooms open, so each room's workers kept running for the rest of the package. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
c2339b2b85
commit
44b791ad50
@@ -906,6 +906,7 @@ func newRoomWithParticipants(t *testing.T, opts testRoomOpts) *Room {
|
||||
telemetry.NewTelemetryService(n, &telemetryfakes.FakeAnalyticsService{}),
|
||||
nil, nil, nil,
|
||||
)
|
||||
t.Cleanup(func() { rm.Close(types.RoomCloseReasonUnknown) })
|
||||
for i := 0; i < opts.num+opts.numHidden; i++ {
|
||||
identity := livekit.ParticipantIdentity(fmt.Sprintf("p%d", i))
|
||||
participant := NewMockParticipant(identity, opts.protocol, i >= opts.num, true, rm.LocalParticipantListener())
|
||||
|
||||
Reference in New Issue
Block a user