Skip to content

Commit 4922e0d

Browse files
authored
Fix RC in data_channel_test.exs (#189)
1 parent f87341e commit 4922e0d

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

test/ex_webrtc/data_channel_test.exs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,11 +201,15 @@ defmodule ExWebRTC.DataChannelTest do
201201
assert_receive {:ex_webrtc, ^pc1, {:data, ^ref1, ^data}}
202202
end
203203

204-
test "and collecting stats about it", %{pc1: pc1, pc2: pc2, ref1: ref1} do
204+
test "and collecting stats about it", %{pc1: pc1, pc2: pc2, ref1: ref1, ref2: ref2} do
205205
for _ <- 1..10 do
206206
:ok = PeerConnection.send_data(pc1, ref1, <<1, 2, 3>>)
207207
end
208208

209+
for _ <- 1..10 do
210+
assert_receive {:ex_webrtc, ^pc2, {:data, ^ref2, <<1, 2, 3>>}}
211+
end
212+
209213
stats1 = PeerConnection.get_stats(pc1)
210214
assert {_ref, channel_stats1} = Enum.find(stats1, fn {_, v} -> v.type == :data_channel end)
211215
assert channel_stats1.bytes_sent == 30

0 commit comments

Comments
 (0)