summaryrefslogtreecommitdiff
path: root/tests/fixtures
diff options
context:
space:
mode:
authorJames E. Blair <jeblair@redhat.com>2017-11-30 14:17:25 -0800
committerJames E. Blair <jeblair@redhat.com>2017-12-01 09:42:14 -0800
commit74be381ef406b29030424e3e0a62a6183993347b (patch)
treef6249631b2486fcc0d19fdec88405d8347120dcd /tests/fixtures
parent8fd207bdf2212a838ddc14a26d96e66544e5882a (diff)
downloadzuul-74be381ef406b29030424e3e0a62a6183993347b.tar.gz
Don't shrink windows on reconfiguration
The window size supplied by the user on a pipeline is really the starting window size. It can grow without bound, and so there is no reason to shrink a window on reconfiguration. For that matter, it's not necessary to increase it either, unless the user has raised the floor higher than the current value. Therefore, use the existing window value on static (ie, dependent) change queues during reconfiguration, or the new floor if it is higher. Dynamic queues will get new values from the pipeline (whose value is also conditionally updated in the same manner). In review, we discovered that some folks may be using the expotential window type to create a static window. To make sure this doesn't break that case, add a test for it. Since that can be used to intentionally reduce the window size on reconfiguration, this new test mirrors the test for window shrinkage added in the previous change which must be altered now that we don't auto-shrink on reconfiguration. Change-Id: Iaba25788ebe51ced919dc896aa20aa90675d7773
Diffstat (limited to 'tests/fixtures')
-rw-r--r--tests/fixtures/layouts/reconfigure-window-fixed.yaml46
-rw-r--r--tests/fixtures/layouts/reconfigure-window-fixed2.yaml46
2 files changed, 92 insertions, 0 deletions
diff --git a/tests/fixtures/layouts/reconfigure-window-fixed.yaml b/tests/fixtures/layouts/reconfigure-window-fixed.yaml
new file mode 100644
index 000000000..9aa1a973c
--- /dev/null
+++ b/tests/fixtures/layouts/reconfigure-window-fixed.yaml
@@ -0,0 +1,46 @@
+- pipeline:
+ name: gate
+ manager: dependent
+ trigger:
+ gerrit:
+ - event: comment-added
+ approval:
+ - Approved: 1
+ start:
+ gerrit:
+ Verified: 0
+ success:
+ gerrit:
+ Verified: 2
+ submit: true
+ failure:
+ gerrit:
+ Verified: -2
+ window: 2
+ window-increase-type: exponential
+ window-increase-factor: 1
+ window-decrease-type: exponential
+ window-decrease-factor: 1
+
+- job:
+ name: base
+ parent: null
+ nodeset:
+ nodes:
+ - label: ubuntu-xenial
+ name: controller
+
+- job:
+ name: job1
+ run: playbooks/job1.yaml
+
+- job:
+ name: job2
+ run: playbooks/job2.yaml
+
+- project:
+ name: org/project
+ gate:
+ jobs:
+ - job1
+ - job2
diff --git a/tests/fixtures/layouts/reconfigure-window-fixed2.yaml b/tests/fixtures/layouts/reconfigure-window-fixed2.yaml
new file mode 100644
index 000000000..13382c56b
--- /dev/null
+++ b/tests/fixtures/layouts/reconfigure-window-fixed2.yaml
@@ -0,0 +1,46 @@
+- pipeline:
+ name: gate
+ manager: dependent
+ trigger:
+ gerrit:
+ - event: comment-added
+ approval:
+ - Approved: 1
+ start:
+ gerrit:
+ Verified: 0
+ success:
+ gerrit:
+ Verified: 2
+ submit: true
+ failure:
+ gerrit:
+ Verified: -2
+ window: 1
+ window-increase-type: exponential
+ window-increase-factor: 1
+ window-decrease-type: exponential
+ window-decrease-factor: 1
+
+- job:
+ name: base
+ parent: null
+ nodeset:
+ nodes:
+ - label: ubuntu-xenial
+ name: controller
+
+- job:
+ name: job1
+ run: playbooks/job1.yaml
+
+- job:
+ name: job2
+ run: playbooks/job2.yaml
+
+- project:
+ name: org/project
+ gate:
+ jobs:
+ - job1
+ - job2