summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorValery Piashchynski <[email protected]>2021-07-24 12:21:36 +0300
committerValery Piashchynski <[email protected]>2021-07-24 12:21:36 +0300
commit6f65b5ab4323ebd76b2e5a275c5b519d5d848a82 (patch)
treecdbfdf486ba8a7254000114a15aafd086345a25a /tests
parentd73344dcff84c2a30d88e3f932757b6637a179be (diff)
Uniform push to pipelines in the durability tests
Signed-off-by: Valery Piashchynski <[email protected]>
Diffstat (limited to 'tests')
-rw-r--r--tests/plugins/jobs/jobs_with_toxics_test.go22
1 files changed, 18 insertions, 4 deletions
diff --git a/tests/plugins/jobs/jobs_with_toxics_test.go b/tests/plugins/jobs/jobs_with_toxics_test.go
index 4e33ba5c..85fd4fa8 100644
--- a/tests/plugins/jobs/jobs_with_toxics_test.go
+++ b/tests/plugins/jobs/jobs_with_toxics_test.go
@@ -129,11 +129,21 @@ func TestDurabilityAMQP(t *testing.T) {
time.Sleep(time.Second * 3)
disableProxy("redial", t)
- time.Sleep(time.Second * 5)
+ time.Sleep(time.Second * 3)
- enableProxy("redial", t)
+ go func() {
+ time.Sleep(time.Second * 2)
+ t.Run("PushPipelineWhileRedialing-1", pushToPipe("test-1"))
+ t.Run("PushPipelineWhileRedialing-2", pushToPipe("test-2"))
+ }()
time.Sleep(time.Second * 5)
+ enableProxy("redial", t)
+
+ t.Run("PushPipelineWhileRedialing-1", pushToPipe("test-1"))
+ t.Run("PushPipelineWhileRedialing-2", pushToPipe("test-2"))
+
+ time.Sleep(time.Second * 10)
stopCh <- struct{}{}
wg.Wait()
@@ -244,9 +254,13 @@ func TestDurabilitySQS(t *testing.T) {
disableProxy("redial", t)
time.Sleep(time.Second * 3)
- t.Run("PushPipelineWhileRedialing-1", pushToPipeExpectErr("test-1"))
- t.Run("PushPipelineWhileRedialing-2", pushToPipeExpectErr("test-2"))
+ go func() {
+ time.Sleep(time.Second * 2)
+ t.Run("PushPipelineWhileRedialing-1", pushToPipe("test-1"))
+ t.Run("PushPipelineWhileRedialing-2", pushToPipe("test-2"))
+ }()
+ time.Sleep(time.Second * 5)
enableProxy("redial", t)
t.Run("PushPipelineWhileRedialing-1", pushToPipe("test-1"))