Skip to content
This repository has been archived by the owner on Sep 19, 2024. It is now read-only.

Increase HLS Endpoint test timeout on :tracks_added #293

Merged
merged 1 commit into from
Jul 7, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 37 additions & 27 deletions test/membrane_rtc_engine/hls_endpoint_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ defmodule Membrane.RTC.HLSEndpointTest do
@fixtures_dir "./test/fixtures/"
@playlist_playable_delay 20_000
@segment_delay 25_000
@tracks_added_delay 500

setup do
options = [
Expand Down Expand Up @@ -57,9 +58,10 @@ defmodule Membrane.RTC.HLSEndpointTest do
:ok = Engine.add_endpoint(rtc_engine, file_endpoint, id: file_endpoint_id)

assert_receive %Message.EndpointMessage{
endpoint_id: ^file_endpoint_id,
message: :tracks_added
}
endpoint_id: ^file_endpoint_id,
message: :tracks_added
},
@tracks_added_delay

Engine.message_endpoint(rtc_engine, file_endpoint_id, :start)

Expand Down Expand Up @@ -106,16 +108,18 @@ defmodule Membrane.RTC.HLSEndpointTest do
:ok = Engine.add_endpoint(rtc_engine, video_file_endpoint, id: video_file_endpoint_id)

assert_receive %Message.EndpointMessage{
endpoint_id: ^video_file_endpoint_id,
message: :tracks_added
}
endpoint_id: ^video_file_endpoint_id,
message: :tracks_added
},
@tracks_added_delay

:ok = Engine.add_endpoint(rtc_engine, audio_file_endpoint, id: audio_file_endpoint_id)

assert_receive %Message.EndpointMessage{
endpoint_id: ^audio_file_endpoint_id,
message: :tracks_added
}
endpoint_id: ^audio_file_endpoint_id,
message: :tracks_added
},
@tracks_added_delay

Engine.message_endpoint(rtc_engine, video_file_endpoint_id, :start)
Engine.message_endpoint(rtc_engine, audio_file_endpoint_id, :start)
Expand Down Expand Up @@ -165,16 +169,18 @@ defmodule Membrane.RTC.HLSEndpointTest do
:ok = Engine.add_endpoint(rtc_engine, video_file_endpoint, id: video_file_endpoint_id)

assert_receive %Message.EndpointMessage{
endpoint_id: ^video_file_endpoint_id,
message: :tracks_added
}
endpoint_id: ^video_file_endpoint_id,
message: :tracks_added
},
@tracks_added_delay

:ok = Engine.add_endpoint(rtc_engine, audio_file_endpoint, id: audio_file_endpoint_id)

assert_receive %Message.EndpointMessage{
endpoint_id: ^audio_file_endpoint_id,
message: :tracks_added
}
endpoint_id: ^audio_file_endpoint_id,
message: :tracks_added
},
@tracks_added_delay

Engine.message_endpoint(rtc_engine, video_file_endpoint_id, :start)
Engine.message_endpoint(rtc_engine, audio_file_endpoint_id, :start)
Expand Down Expand Up @@ -222,16 +228,18 @@ defmodule Membrane.RTC.HLSEndpointTest do
:ok = Engine.add_endpoint(rtc_engine, file_endpoint, id: file_endpoint_id)

assert_receive %Message.EndpointMessage{
endpoint_id: ^file_endpoint_id,
message: :tracks_added
}
endpoint_id: ^file_endpoint_id,
message: :tracks_added
},
@tracks_added_delay

:ok = Engine.add_endpoint(rtc_engine, file_endpoint_2, id: file_endpoint_id_2)

assert_receive %Message.EndpointMessage{
endpoint_id: ^file_endpoint_id_2,
message: :tracks_added
}
endpoint_id: ^file_endpoint_id_2,
message: :tracks_added
},
@tracks_added_delay

Engine.message_endpoint(rtc_engine, file_endpoint_id, :start)
Engine.message_endpoint(rtc_engine, file_endpoint_id_2, :start)
Expand Down Expand Up @@ -274,16 +282,18 @@ defmodule Membrane.RTC.HLSEndpointTest do
:ok = Engine.add_endpoint(rtc_engine, file_endpoint, id: file_endpoint_id)

assert_receive %Message.EndpointMessage{
endpoint_id: ^file_endpoint_id,
message: :tracks_added
}
endpoint_id: ^file_endpoint_id,
message: :tracks_added
},
@tracks_added_delay

:ok = Engine.add_endpoint(rtc_engine, file_endpoint_2, id: file_endpoint_id_2)

assert_receive %Message.EndpointMessage{
endpoint_id: ^file_endpoint_id_2,
message: :tracks_added
}
endpoint_id: ^file_endpoint_id_2,
message: :tracks_added
},
@tracks_added_delay

Engine.message_endpoint(rtc_engine, file_endpoint_id, :start)
Engine.message_endpoint(rtc_engine, file_endpoint_id_2, :start)
Expand Down