@@ -115,7 +115,7 @@ defmodule RealtimeWeb.RealtimeChannel.BroadcastHandlerTest do
115115 socket
116116 end
117117
118- refute_received { :socket_push , :text , _ } , 120
118+ refute_receive { :socket_push , :text , _ } , 120
119119 end
120120
121121 @ tag policies: [ :read_matching_user_role , :write_matching_user_role ] , role: "anon"
@@ -154,7 +154,7 @@ defmodule RealtimeWeb.RealtimeChannel.BroadcastHandlerTest do
154154 socket
155155 end
156156
157- refute_received { :socket_push , :text , _ } , 120
157+ refute_receive { :socket_push , :text , _ } , 120
158158 end
159159
160160 test "with nil policy and invalid user, won't send message" , % { topic: topic , tenant: tenant , db_conn: db_conn } do
@@ -209,9 +209,7 @@ defmodule RealtimeWeb.RealtimeChannel.BroadcastHandlerTest do
209209 socket
210210 end
211211
212- Process . sleep ( 100 )
213-
214- refute_received _
212+ refute_receive _ , 100
215213 end
216214
217215 test "no ack still sends message" , % { topic: topic , tenant: tenant , db_conn: db_conn } do
@@ -291,7 +289,7 @@ defmodule RealtimeWeb.RealtimeChannel.BroadcastHandlerTest do
291289 { :noreply , _socket } = BroadcastHandler . handle ( % { } , db_conn , socket )
292290
293291 # Enough for the RateCounter to calculate the last bucket
294- refute_received _ , 1200
292+ refute_receive _ , 1200
295293 end )
296294
297295 assert log =~ "RlsPolicyError"
@@ -314,7 +312,7 @@ defmodule RealtimeWeb.RealtimeChannel.BroadcastHandlerTest do
314312 socket
315313 )
316314
317- refute_received { :socket_push , :text , _ } , 120
315+ refute_receive { :socket_push , :text , _ } , 120
318316 end
319317
320318 test "handle payload size excedding limits in public channels" , % { topic: topic , tenant: tenant , db_conn: db_conn } do
@@ -327,7 +325,7 @@ defmodule RealtimeWeb.RealtimeChannel.BroadcastHandlerTest do
327325 socket
328326 )
329327
330- refute_received { :socket_push , :text , _ } , 120
328+ refute_receive { :socket_push , :text , _ } , 120
331329 end
332330
333331 test "handle payload size excedding limits in private channel and if ack it will receive error" , % {
@@ -348,7 +346,7 @@ defmodule RealtimeWeb.RealtimeChannel.BroadcastHandlerTest do
348346 socket
349347 )
350348
351- refute_received { :socket_push , :text , _ } , 120
349+ refute_receive { :socket_push , :text , _ } , 120
352350 end
353351
354352 test "handle payload size excedding limits in public channels and if ack it will receive error" , % {
@@ -365,7 +363,7 @@ defmodule RealtimeWeb.RealtimeChannel.BroadcastHandlerTest do
365363 socket
366364 )
367365
368- refute_received { :socket_push , :text , _ } , 120
366+ refute_receive { :socket_push , :text , _ } , 120
369367 end
370368 end
371369
0 commit comments