summaryrefslogtreecommitdiff
path: root/tests/plugins/jobs
diff options
context:
space:
mode:
authorValery Piashchynski <[email protected]>2021-07-21 16:52:41 +0300
committerValery Piashchynski <[email protected]>2021-07-21 16:52:41 +0300
commitb2da831f47284974551710d2767a7bdde0efa51d (patch)
tree7d8fee59cdb307110d2fcd872635437e0203321b /tests/plugins/jobs
parent50cf036c81668508c8f2e9130bc5a2019cddf1b9 (diff)
Fix AMQP context, add ID, job, other fields.
Fix sqs queue re-creation. Complete redia for the beanstalk. Signed-off-by: Valery Piashchynski <[email protected]>
Diffstat (limited to 'tests/plugins/jobs')
-rw-r--r--tests/plugins/jobs/configs/.rr-jobs-test.yaml100
-rw-r--r--tests/plugins/jobs/jobs_plugin_test.go4
2 files changed, 53 insertions, 51 deletions
diff --git a/tests/plugins/jobs/configs/.rr-jobs-test.yaml b/tests/plugins/jobs/configs/.rr-jobs-test.yaml
index e3c0b017..8213d72a 100644
--- a/tests/plugins/jobs/configs/.rr-jobs-test.yaml
+++ b/tests/plugins/jobs/configs/.rr-jobs-test.yaml
@@ -43,47 +43,47 @@ jobs:
# list of broker pipelines associated with endpoints
pipelines:
- test-local:
- driver: ephemeral
- priority: 10
- pipeline_size: 10000
-
- test-local-2:
- driver: ephemeral
- priority: 1
- pipeline_size: 10000
-
- test-local-3:
- driver: ephemeral
- priority: 2
- pipeline_size: 10000
-
- test-1:
- driver: amqp
- priority: 1
- pipeline_size: 1000000
- queue: test-1-queue
- exchange: default
- exchange_type: direct
- routing_key: test
-
- test-4:
- driver: amqp
- priority: 1
- pipeline_size: 1000000
- queue: test-1-queue
- exchange: default
- exchange_type: direct
- routing_key: test
-
- test-2-amqp:
- driver: amqp
- priority: 2
- pipeline_size: 100000
- queue: test-2-queue
- exchange: default
- exchange_type: direct
- routing_key: test-2
+# test-local:
+# driver: ephemeral
+# priority: 10
+# pipeline_size: 10000
+#
+# test-local-2:
+# driver: ephemeral
+# priority: 1
+# pipeline_size: 10000
+#
+# test-local-3:
+# driver: ephemeral
+# priority: 2
+# pipeline_size: 10000
+#
+# test-1:
+# driver: amqp
+# priority: 1
+# pipeline_size: 1000000
+# queue: test-1-queue
+# exchange: default
+# exchange_type: direct
+# routing_key: test
+#
+# test-4:
+# driver: amqp
+# priority: 1
+# pipeline_size: 1000000
+# queue: test-1-queue
+# exchange: default
+# exchange_type: direct
+# routing_key: test
+#
+# test-2-amqp:
+# driver: amqp
+# priority: 2
+# pipeline_size: 100000
+# queue: test-2-queue
+# exchange: default
+# exchange_type: direct
+# routing_key: test-2
test-2:
driver: beanstalk
@@ -92,15 +92,15 @@ jobs:
pipeline_size: 1000000
reserve_timeout: 10s
- test-3:
- driver: sqs
- pipeline_size: 1000000
- queue: default
- attributes:
- MessageRetentionPeriod: 86400
- tags:
- test: "tag"
+# test-3:
+# driver: sqs
+# pipeline_size: 1000000
+# queue: default
+# attributes:
+# MessageRetentionPeriod: 86400
+# tags:
+# test: "tag"
# list of pipelines to be consumed by the server, keep empty if you want to start consuming manually
- consume: [ "test-local", "test-local-2", "test-local-3", "test-1", "test-2-amqp", "test-3" ]
+ consume: [ "test-local", "test-local-2", "test-local-3", "test-1", "test-2-amqp", "test-3", "test-2" ]
diff --git a/tests/plugins/jobs/jobs_plugin_test.go b/tests/plugins/jobs/jobs_plugin_test.go
index 59f55f3d..f9f19e0b 100644
--- a/tests/plugins/jobs/jobs_plugin_test.go
+++ b/tests/plugins/jobs/jobs_plugin_test.go
@@ -17,6 +17,7 @@ import (
"github.com/spiral/roadrunner/v2/plugins/informer"
"github.com/spiral/roadrunner/v2/plugins/jobs"
"github.com/spiral/roadrunner/v2/plugins/jobs/drivers/amqp"
+ "github.com/spiral/roadrunner/v2/plugins/jobs/drivers/beanstalk"
"github.com/spiral/roadrunner/v2/plugins/jobs/drivers/ephemeral"
"github.com/spiral/roadrunner/v2/plugins/jobs/drivers/sqs"
"github.com/spiral/roadrunner/v2/plugins/logger"
@@ -49,6 +50,7 @@ func TestTEMP_INTI(t *testing.T) {
&ephemeral.Plugin{},
&sqs.Plugin{},
&amqp.Plugin{},
+ &beanstalk.Plugin{},
)
assert.NoError(t, err)
@@ -97,7 +99,7 @@ func TestTEMP_INTI(t *testing.T) {
}
}()
- time.Sleep(time.Second * 3)
+ time.Sleep(time.Second * 3000)
stopCh <- struct{}{}
wg.Wait()
}