instrumentisto / medea-jason

Mozilla Public License 2.0
2 stars 2 forks source link

Fix flaky E2E tests #153

Closed alexlapa closed 9 months ago

alexlapa commented 9 months ago

Synopsis

These e2e tests are really flaky:

Feature: Media enabling/disabling
  Scenario: Member enables audio during call
    Given room with joined member Alice
    And member Bob with disabled audio publishing
    When Bob joins the room
    And Bob enables audio and awaits it completes
    Then Alice's audio remote track from Bob is enabled

  Scenario: Member enables video during call
    Given room with joined member Alice
    And member Bob with disabled video publishing
    When Bob joins the room
    And Bob enables video and awaits it completes
    Then Alice's device video remote track from Bob is enabled

So I've debugged them a little bit and whats going on is that Bob enables * part (which is a RoomHandle.enable_* call) happens during the initial negotiation, between PeerCreated { role: Answererer(sdp) } and MakeSdpAnswer { sdp_answer } events.

Solution

So now we have two problems, first is that test is not doing what it is supposed to, and that server-side seems to break if both disable and enable track request are emitted by client during negotiation.

This PR resolves the first problem by waiting till on_new_connection is fired on both members before enabling the track.

Second problem should be resolved in medea.

Checklist

alexlapa commented 9 months ago

FCM:

Fix flaky E2E tests (#153)