Fix race in test_periodic_override
The main body of the test used a config with a job with a branch selector
so that even though the timer trigger fired 2 events, only one of them would
result in a job being run. However, the second config which the test switched
to in order to disable the timer dropped the branch selector, meaning that
in some cases an event in progress could end up causing a second job to start
running. Add a new second configuration which retains the branch selector
to correct this.
Also, add some waitUntilSettled methods after the second reconfiguration, even
though they still shouldn't be strictly necessary. If there are any more
race conditions, this should serve to stabilize them.
Change-Id: I309983148739943cb810e84322551e830d80cac5
diff --git a/tests/fixtures/layouts/repo-checkout-no-timer-override.yaml b/tests/fixtures/layouts/repo-checkout-no-timer-override.yaml
new file mode 100644
index 0000000..de3bfe0
--- /dev/null
+++ b/tests/fixtures/layouts/repo-checkout-no-timer-override.yaml
@@ -0,0 +1,21 @@
+- pipeline:
+ name: periodic
+ manager: independent
+ # Trigger is required, set it to one that is a noop
+ # during tests that check the timer trigger.
+ trigger:
+ gerrit:
+ - event: ref-updated
+
+- job:
+ name: integration
+ branches: master
+ override-branch: stable/havana
+ required-projects:
+ - org/project1
+
+- project:
+ name: org/project1
+ periodic:
+ jobs:
+ - integration