-
Notifications
You must be signed in to change notification settings - Fork 33
/
Copy pathscheduled_task.feature
28 lines (24 loc) · 1.52 KB
/
scheduled_task.feature
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
Feature: Reporting Unhandled exceptions in a scheduled task
Scenario: Report an exception from a spring boot scheduled task
When I run spring boot "ScheduledTaskScenario" with the defaults
And I wait to receive an error
And the error is valid for the error reporting API version "4" for the "Bugsnag Spring" notifier
And the error payload field "events" is an array with 1 elements
And the event "unhandled" is true
And the event "severity" equals "error"
And the exception "errorClass" equals "java.lang.RuntimeException"
And the exception "message" equals "Unhandled exception from ScheduledTaskService"
And the event "severityReason.type" equals "unhandledExceptionMiddleware"
And the event "severityReason.attributes.framework" equals "Spring"
Scenario: Report an exception from a plain spring scheduled task
Given I set environment variable "RUN_SCHEDULED_TASK" to "true"
And I run the plain spring app
And I wait to receive an error
And the error is valid for the error reporting API version "4" for the "Bugsnag Spring" notifier
And the error payload field "events" is an array with 1 elements
And the event "unhandled" is true
And the event "severity" equals "error"
And the exception "errorClass" equals "java.lang.RuntimeException"
And the exception "message" equals "Unhandled exception from ScheduledTaskService"
And the event "severityReason.type" equals "unhandledExceptionMiddleware"
And the event "severityReason.attributes.framework" equals "Spring"