Each scheduler in tests needs its own connection registries.
This change only affects tests.
Change-Id: I2ad188cf5a72c46f7486c23ab653ff574123308b
Story: 2007192
To improve consistency and remove `self.sched` and
use `self.scheds.first.sched` in all tests.
This change only touches tests.
Change-Id: I0a8c3f8ad634d1d88f3c68a11e4d5587993f4a0d
Story: 2007192
As a preparation for scale-out-scheduler the scheduler in tests
were extracted in order to start multiple instances in a previous
change.
This change continues on by introducing a manager to create
additional scheduler instances and the ability to call certain
methods on some or all of those instances.
This change only touches tests.
Change-Id: Ia05a7221f19bad97de1176239c075b8fc9dab7e5
Story: 2007192
This corrects the following errors.
Test fixture errors:
* Unlike the SSH API, the Gerrit REST API does not include
COMMIT_MSG in the list of files.
* We weren't checking all elements of the (change id, branch,
project) tuple when searching for change ids
* I observed a race around poll synchronization; I can't figure it out
so I've added more debug log lines.
Production errors:
* Break after the first successful submit rather than attemping the
call multiple times in all cases. This was non-fatal.
* Only attempt to get the remote version if using HTTP. This was
non-fatal.
* URLquote search queries (they may contain '#'). The additional CRD
tests cover this now.
* Coerce the list of files to a list rather than a dict_keys instance.
The new single file test covers this.
Change-Id: I89a68b2d189b82f0bc64e78fbc875d5628cc2cf0
This change changes the dependency cycle error handling in order
to report the error to the user via the standard report mechanics.
Change-Id: I7cdbd9b7b48fd612b2887007b70acedd7a8e3113
This corrects a false-positive in the dependency cycle detection,
but only for the new URL-style depends-on headers. It does not
do so for the legacy gerrit headers.
We used a single history list to store all the changes we enqueued
ahead of a given change, but this meant that if there was more
than one path to a change, we would see it in the history on the
second traversal. Instead, when traversing the tree, use copies
of the history list at each stage so that it can be rewound when
going back up the tree. The second path to a change will not
trip the cycle detection, and will proceed on to the point where
it notices the change is already in the queue and return harmlessly.
Also, check whether the exact change is in the history, not just
the number, since numbers are no longer unique with multiple sources.
Also, fix a bug in the test_crd_cycle test which was causing the
test to always pass since the changes were never enqueued due to
missing approval requirements.
Change-Id: I3241f90a1d7469d433cfa176e719322203d4d089
Story: 2001427
Task: 6133
This new class holds the unit tests which verify the soon-to-be
"legacy" form of cross-repo-dependencies which use the gerrit
change-id in the commit message footer. The new form will use the
URL instead. We will maintain both forms for some time, so keep
these tests around. In a later change, this file will be duplicated
to exercise the same behavior with the new URL-based form.
Change-Id: I63a7398640bf82963fadf19acdcd2208c185da0b