File tree Expand file tree Collapse file tree 1 file changed +10
-10
lines changed
Expand file tree Collapse file tree 1 file changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -115,19 +115,19 @@ def test_rejection_rate_decreases_with_successful_pings
115115
116116 time_travel ( 1.0 ) do
117117 @controller . update
118- end
119- initial_rejection = @controller . rejection_rate
120118
121- # Now simulate successful pings and lower error rate
122- 10 . times { @controller . record_request ( :success ) }
123- 5 . times { @controller . record_ping ( :success ) }
119+ initial_rejection = @controller . rejection_rate
124120
125- time_travel ( 1.0 ) do
126- @controller . update
127- end
121+ # Now simulate successful pings and lower error rate
122+ 10 . times { @controller . record_request ( :success ) }
123+ 5 . times { @controller . record_ping ( :success ) }
128124
129- # Rejection rate should decrease
130- assert_operator ( @controller . rejection_rate , :< , initial_rejection )
125+ time_travel ( 1.0 ) do
126+ @controller . update
127+
128+ assert_operator ( @controller . rejection_rate , :< , initial_rejection )
129+ end
130+ end
131131 end
132132
133133 def test_rejection_rate_clamped_between_0_and_1
You can’t perform that action at this time.
0 commit comments