diff options
author | Simon Westphahl <simon.westphahl@bmw.de> | 2021-10-20 14:29:27 +0200 |
---|---|---|
committer | Simon Westphahl <simon.westphahl@bmw.de> | 2021-10-29 12:04:44 +0200 |
commit | 4faf5498e41860ccdcfd6531bd0128934c661ad9 (patch) | |
tree | f24c21a2885e08139d756aa9c81e694dd2116611 /tests | |
parent | 4ebedf55e1ab6c48cdfcb795f82fc57a49b28d91 (diff) | |
download | zuul-4faf5498e41860ccdcfd6531bd0128934c661ad9.tar.gz |
Move re-enqueue to pipeline processing
Moving the re-enqueue step after a reconfiguration to the pipeline
processing phase allows us to re-enqueue multiple pipelines in
parallel in a multi-scheduler environment.
In case of a failure the re-enqueue can also be retried the next time
the pipeline is processed.
Change-Id: Iad483c37610b51d94ead72573c3540b1dea9ab84
Diffstat (limited to 'tests')
-rw-r--r-- | tests/unit/test_cross_crd.py | 2 | ||||
-rw-r--r-- | tests/unit/test_gerrit_crd.py | 1 | ||||
-rw-r--r-- | tests/unit/test_gerrit_legacy_crd.py | 1 | ||||
-rw-r--r-- | tests/unit/test_scheduler.py | 3 |
4 files changed, 7 insertions, 0 deletions
diff --git a/tests/unit/test_cross_crd.py b/tests/unit/test_cross_crd.py index 9e04241f2..462190da1 100644 --- a/tests/unit/test_cross_crd.py +++ b/tests/unit/test_cross_crd.py @@ -347,6 +347,7 @@ class TestGerritToGithubCRD(ZuulTestCase): self.waitUntilSettled() self.scheds.execute(lambda app: app.sched.reconfigure(app.config)) + self.waitUntilSettled() # Make sure the items still share a change queue, and the # first one is not live. @@ -798,6 +799,7 @@ class TestGithubToGerritCRD(ZuulTestCase): self.waitUntilSettled() self.scheds.execute(lambda app: app.sched.reconfigure(app.config)) + self.waitUntilSettled() # Make sure the items still share a change queue, and the # first one is not live. diff --git a/tests/unit/test_gerrit_crd.py b/tests/unit/test_gerrit_crd.py index ff2c7277c..e42bafef5 100644 --- a/tests/unit/test_gerrit_crd.py +++ b/tests/unit/test_gerrit_crd.py @@ -517,6 +517,7 @@ class TestGerritCRD(ZuulTestCase): self.waitUntilSettled() self.scheds.execute(lambda app: app.sched.reconfigure(app.config)) + self.waitUntilSettled() # Make sure the items still share a change queue, and the # first one is not live. diff --git a/tests/unit/test_gerrit_legacy_crd.py b/tests/unit/test_gerrit_legacy_crd.py index f6337dd30..1e7488231 100644 --- a/tests/unit/test_gerrit_legacy_crd.py +++ b/tests/unit/test_gerrit_legacy_crd.py @@ -446,6 +446,7 @@ class TestGerritLegacyCRD(ZuulTestCase): self.waitUntilSettled() self.scheds.execute(lambda app: app.sched.reconfigure(app.config)) + self.waitUntilSettled() # Make sure the items still share a change queue, and the # first one is not live. diff --git a/tests/unit/test_scheduler.py b/tests/unit/test_scheduler.py index 2016fbb28..0bd925f35 100644 --- a/tests/unit/test_scheduler.py +++ b/tests/unit/test_scheduler.py @@ -5481,6 +5481,7 @@ class TestScheduler(ZuulTestCase): self.commitConfigUpdate('org/common-config', 'layouts/reconfigure-window2.yaml') self.scheds.execute(lambda app: app.sched.reconfigure(app.config)) + self.waitUntilSettled() tenant = self.scheds.first.sched.abide.tenants.get('tenant-one') queue = tenant.layout.pipelines['gate'].queues[0] # Even though we have configured a smaller window, the value @@ -5489,6 +5490,7 @@ class TestScheduler(ZuulTestCase): self.assertTrue(len(self.builds), 4) self.scheds.execute(lambda app: app.sched.reconfigure(app.config)) + self.waitUntilSettled() tenant = self.scheds.first.sched.abide.tenants.get('tenant-one') queue = tenant.layout.pipelines['gate'].queues[0] self.assertEqual(queue.window, 20) @@ -5539,6 +5541,7 @@ class TestScheduler(ZuulTestCase): self.assertEqual(len(self.builds), 4) self.scheds.execute(lambda app: app.sched.reconfigure(app.config)) + self.waitUntilSettled() tenant = self.scheds.first.sched.abide.tenants.get('tenant-one') queue = tenant.layout.pipelines['gate'].queues[0] self.assertEqual(queue.window, 1) |