Skip to content

Commit

Permalink
Handle prflx candiadtes
Browse files Browse the repository at this point in the history
  • Loading branch information
roznawsk committed Dec 4, 2024
1 parent fc8f2d8 commit db725ec
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -208,9 +208,10 @@ defmodule TestVideoroom.Integration.BasicTest do
|> Task.await_many(:infinity)

all_reports = receive_reports()
valid_reports = Enum.drop_while(all_reports, fn report -> MetricsValidator.validate_report(report) != :ok end)
valid_reports = Enum.drop_while(all_reports, &(MetricsValidator.validate_report(&1) != :ok))

error_msg = "Not enough valid reports in #{inspect(all_reports)}"
results = Enum.map(all_reports, &MetricsValidator.validate_report(&1))
error_msg = "Too many reports failed. Results: #{inspect(results)}"
assert length(valid_reports) >= report_count - 3, error_msg

Enum.each(valid_reports, fn report ->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ defmodule TestVideoroom.MetricsValidator do
} = candidate,
_acc
) do
if is_number(port) and type in [:host, :srflx] and is_tuple(address) and
if is_number(port) and type in [:host, :srflx, :prflx] and is_tuple(address) and
protocol in [:udp, :tcp] do
{:cont, :ok}
else
Expand Down

0 comments on commit db725ec

Please sign in to comment.