@@ -27,13 +27,14 @@ func _before_send(_ev: SentryEvent) -> SentryEvent:
2727
2828## Only two errors should be logged within the assigned time window.
2929func test_throttling_limits () -> void :
30- var monitor := monitor_signals (self , false )
30+ monitor_signals (self , false )
31+
3132 push_error ("dummy-error" )
3233 push_error ("dummy-error" )
3334 push_error ("dummy-error" )
34- await assert_signal ( monitor ). is_emitted ( "callback_processed" )
35- await assert_signal (monitor ).is_emitted ("callback_processed" )
36- await get_tree ().create_timer ( 0.1 ). timeout
35+
36+ await assert_signal (self ).is_emitted ("callback_processed" )
37+ await get_tree ().process_frame # allow all events to process
3738 assert_int (_num_events ).is_equal (2 )
3839
3940 # Wait for throttling window to expire.
@@ -42,7 +43,6 @@ func test_throttling_limits() -> void:
4243 push_error ("dummy-error" )
4344 push_error ("dummy-error" )
4445 push_error ("dummy-error" )
45- await assert_signal (monitor ).is_emitted ("callback_processed" )
46- await assert_signal (monitor ).is_emitted ("callback_processed" )
47- await get_tree ().create_timer (0.1 ).timeout
46+ await assert_signal (self ).is_emitted ("callback_processed" )
47+ await get_tree ().process_frame # allow all events to process
4848 assert_int (_num_events ).is_equal (4 )
0 commit comments