@@ -118,7 +118,7 @@ defmodule NotifierTest do
118
118
defmodule PlugErrorWithExponentialTriggerNotifier do
119
119
use BoomNotifier ,
120
120
notifier: FakeNotifier ,
121
- notification_trigger : :exponential ,
121
+ count : :exponential ,
122
122
options: [
123
123
subject: "BOOM error caught" ,
124
124
sender_pid_name: TestMessageProxy
@@ -132,7 +132,7 @@ defmodule NotifierTest do
132
132
defmodule PlugErrorWithExponentialTriggerWithLimitNotifier do
133
133
use BoomNotifier ,
134
134
notifier: FakeNotifier ,
135
- notification_trigger : [ exponential: [ limit: 3 ] ] ,
135
+ count : [ exponential: [ limit: 3 ] ] ,
136
136
options: [
137
137
subject: "BOOM error caught" ,
138
138
sender_pid_name: TestMessageProxy
@@ -229,7 +229,7 @@ defmodule NotifierTest do
229
229
assert_receive ( % { exception: % { subject: "BOOM error caught: thrown error" } } , @ receive_timeout )
230
230
end
231
231
232
- test "reports exception in groups when :notification_trigger setting is :exponential" do
232
+ test "reports exception in groups when :count setting is :exponential" do
233
233
conn = conn ( :get , "/" )
234
234
235
235
catch_error ( PlugErrorWithExponentialTriggerNotifier . call ( conn , [ ] ) )
@@ -239,11 +239,10 @@ defmodule NotifierTest do
239
239
catch_error ( PlugErrorWithExponentialTriggerNotifier . call ( conn , [ ] ) )
240
240
assert_receive ( % { exception: _ } , @ receive_timeout )
241
241
242
- { :message_queue_len , exceptions } = Process . info ( self ( ) , :message_queue_len )
243
- assert exceptions == 0
242
+ refute_receive ( % { exception: _ } , @ receive_timeout )
244
243
end
245
244
246
- test "reports exception in groups when :notification_trigger setting is :exponential with limit" do
245
+ test "reports exception in groups when :count setting is :exponential with limit" do
247
246
conn = conn ( :get , "/" )
248
247
249
248
catch_error ( PlugErrorWithExponentialTriggerWithLimitNotifier . call ( conn , [ ] ) )
@@ -263,11 +262,10 @@ defmodule NotifierTest do
263
262
catch_error ( PlugErrorWithExponentialTriggerWithLimitNotifier . call ( conn , [ ] ) )
264
263
assert_receive ( % { exception: _ } , @ receive_timeout )
265
264
266
- { :message_queue_len , exceptions } = Process . info ( self ( ) , :message_queue_len )
267
- assert exceptions == 0
265
+ refute_receive ( % { exception: _ } , @ receive_timeout )
268
266
end
269
267
270
- test "reports every exception when :notification_trigger setting is not set" do
268
+ test "reports every exception when :count setting is not set" do
271
269
conn = conn ( :get , "/" )
272
270
273
271
catch_error ( PlugErrorWithSingleNotifier . call ( conn , [ ] ) )
0 commit comments