-
Notifications
You must be signed in to change notification settings - Fork 33
/
Copy pathscheduled_task_executor.feature
44 lines (38 loc) · 2.83 KB
/
scheduled_task_executor.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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
Feature: Verifies that unhandled exceptions in scheduled tasks are reported to Bugsnag regardless of Scheduler configuration
Scenario: By default a single-threaded ThreadPoolTaskScheduler is used
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 exception "message" equals "Unhandled exception from ScheduledTaskService"
Scenario: A TaskScheduler supplied as a bean is used
Given I set environment variable "custom_task_scheduler_bean" to "true"
And 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 exception "message" equals "Unhandled exception from ScheduledTaskService"
Scenario: A ScheduledExecutorService supplied as a bean is used
Given I set environment variable "scheduled_executor_service_bean" to "true"
And 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 exception "message" equals "Unhandled exception from ScheduledTaskService"
Scenario: For multiple ScheduledExecutorService beans, the one named "taskScheduler" is used
Given I set environment variable "scheduled_executor_service_bean" to "true"
And I set environment variable "other_scheduled_executor_service_bean" to "true"
And 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 exception "message" equals "Unhandled exception from ScheduledTaskService"
Scenario: For multiple TaskScheduler beans, the one named "taskScheduler" is used
Given I set environment variable "custom_task_scheduler_bean" to "true"
Given I set environment variable "second_task_scheduler_bean" to "true"
And 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 exception "message" equals "Unhandled exception from ScheduledTaskService"
Scenario: Scheduled tasks execute on a ScheduledExecutorService rather than a single-threaded Executor, when available
Given I set environment variable "scheduled_executor_service_bean" to "true"
And I run spring boot "ScheduledTaskExecutorScenario" 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 event "metaData.executor.multiThreaded" is true