diff --git a/test/scenarios.go b/test/scenarios.go index b2ddad5db..76c93f559 100644 --- a/test/scenarios.go +++ b/test/scenarios.go @@ -154,7 +154,7 @@ func scenarioWSReconnect(t *testing.T) { func publishTracksForClients(t *testing.T, clients ...*testclient.RTCClient) []*testclient.TrackWriter { logger.Infow("publishing tracks for clients") var writers []*testclient.TrackWriter - for i, _ := range clients { + for i := range clients { c := clients[i] tw, err := c.AddStaticTrack("audio/opus", "audio", "webcam") require.NoError(t, err) diff --git a/test/singlenode_test.go b/test/singlenode_test.go index a4a4f0ae7..a50cbee84 100644 --- a/test/singlenode_test.go +++ b/test/singlenode_test.go @@ -28,11 +28,7 @@ func TestClientCouldConnect(t *testing.T) { // ensure they both see each other testutils.WithTimeout(t, "c1 and c2 could connect", func() bool { - if len(c1.RemoteParticipants()) == 0 || len(c2.RemoteParticipants()) == 0 { - return false - } - //require.Equal() - return true + return len(c1.RemoteParticipants()) != 0 && len(c2.RemoteParticipants()) != 0 }) } @@ -103,7 +99,7 @@ func TestSinglePublisher(t *testing.T) { // when c3 disconnects.. ensure subscriber is cleaned up correctly c3.Stop() - success = testutils.WithTimeout(t, "c3 is cleaned up as a subscriber", func() bool { + testutils.WithTimeout(t, "c3 is cleaned up as a subscriber", func() bool { room := s.RoomManager().GetRoom(context.Background(), testRoom) require.NotNil(t, room)