summaryrefslogtreecommitdiff
path: root/modules/system/tests
diff options
context:
space:
mode:
authorDavid Rothstein <drothstein@gmail.com>2014-05-05 17:10:24 -0400
committerDavid Rothstein <drothstein@gmail.com>2014-05-05 17:10:24 -0400
commit07a910ede989af178d98c92aff7080bc027a06ce (patch)
tree980bd90370f2ba1d32e5dc1a5d569b3c3aa517ec /modules/system/tests
parent808a61aef282f43f55bf9d8db1de8d947f32e357 (diff)
downloadbrdo-07a910ede989af178d98c92aff7080bc027a06ce.tar.gz
brdo-07a910ede989af178d98c92aff7080bc027a06ce.tar.bz2
Issue #2021933 by Crell, David_Rothstein, joachim, lz1irq: Catch exceptions from queue workers.
Diffstat (limited to 'modules/system/tests')
-rw-r--r--modules/system/tests/cron_queue_test.info6
-rw-r--r--modules/system/tests/cron_queue_test.module15
2 files changed, 21 insertions, 0 deletions
diff --git a/modules/system/tests/cron_queue_test.info b/modules/system/tests/cron_queue_test.info
new file mode 100644
index 000000000..718cb10d3
--- /dev/null
+++ b/modules/system/tests/cron_queue_test.info
@@ -0,0 +1,6 @@
+name = Cron Queue test
+description = 'Support module for the cron queue runner.'
+package = Testing
+version = VERSION
+core = 7.x
+hidden = TRUE
diff --git a/modules/system/tests/cron_queue_test.module b/modules/system/tests/cron_queue_test.module
new file mode 100644
index 000000000..e95c6b6af
--- /dev/null
+++ b/modules/system/tests/cron_queue_test.module
@@ -0,0 +1,15 @@
+<?php
+
+/**
+ * Implements hook_cron_queue_info().
+ */
+function cron_queue_test_cron_queue_info() {
+ $queues['cron_queue_test_exception'] = array(
+ 'worker callback' => 'cron_queue_test_exception',
+ );
+ return $queues;
+}
+
+function cron_queue_test_exception($item) {
+ throw new Exception('That is not supposed to happen.');
+}