diff options
author | Zuul <zuul@review.opendev.org> | 2021-09-26 10:17:54 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2021-09-26 10:17:54 +0000 |
commit | d81364c90c7098fa43665eb48b91099552c0314b (patch) | |
tree | 0f0e9890a915faeadec4c71081e462836b49cdf2 /tests/unit/test_zk.py | |
parent | 56327019301d611b7d427970564c79155a87f32d (diff) | |
parent | c6ce4ae2bb00702a0ad96cc51eda2b6296886eac (diff) | |
download | zuul-d81364c90c7098fa43665eb48b91099552c0314b.tar.gz |
Merge "Don't use executor.builds when processing build result events"
Diffstat (limited to 'tests/unit/test_zk.py')
-rw-r--r-- | tests/unit/test_zk.py | 33 |
1 files changed, 22 insertions, 11 deletions
diff --git a/tests/unit/test_zk.py b/tests/unit/test_zk.py index 2a3339f0c..c3c23eb42 100644 --- a/tests/unit/test_zk.py +++ b/tests/unit/test_zk.py @@ -368,7 +368,8 @@ class TestExecutorApi(ZooKeeperBaseTestCase): build_event_callback=eq_put) # Scheduler submits request - request = BuildRequest("A", None, "tenant", "pipeline", '1') + request = BuildRequest( + "A", None, None, "job", "tenant", "pipeline", '1') client.submit(request, {'job': 'test'}) request_queue.get(timeout=30) @@ -463,7 +464,8 @@ class TestExecutorApi(ZooKeeperBaseTestCase): build_event_callback=eq_put) # Scheduler submits request - request = BuildRequest("A", None, "tenant", "pipeline", '1') + request = BuildRequest( + "A", None, None, "job", "tenant", "pipeline", '1') client.submit(request, {}) request_queue.get(timeout=30) @@ -516,7 +518,8 @@ class TestExecutorApi(ZooKeeperBaseTestCase): build_event_callback=eq_put) # Scheduler submits request - request = BuildRequest("A", None, "tenant", "pipeline", '1') + request = BuildRequest( + "A", None, None, "job", "tenant", "pipeline", '1') client.submit(request, {}) request_queue.get(timeout=30) @@ -553,7 +556,8 @@ class TestExecutorApi(ZooKeeperBaseTestCase): client = ExecutorApi(self.zk_client) # Scheduler submits request - request = BuildRequest("A", None, "tenant", "pipeline", '1') + request = BuildRequest( + "A", None, None, "job", "tenant", "pipeline", '1') client.submit(request, {}) sched_a = client.get(request.path) @@ -573,22 +577,27 @@ class TestExecutorApi(ZooKeeperBaseTestCase): # requests executor_api = ExecutorApi(self.zk_client) - br = BuildRequest("A", "zone", "tenant", "pipeline", '1') + br = BuildRequest( + "A", "zone", None, "job", "tenant", "pipeline", '1') executor_api.submit(br, {}) - br = BuildRequest("B", None, "tenant", "pipeline", '1') + br = BuildRequest( + "B", None, None, "job", "tenant", "pipeline", '1') executor_api.submit(br, {}) path_b = br.path - br = BuildRequest("C", "zone", "tenant", "pipeline", '1') + br = BuildRequest( + "C", "zone", None, "job", "tenant", "pipeline", '1') executor_api.submit(br, {}) path_c = br.path - br = BuildRequest("D", "zone", "tenant", "pipeline", '1') + br = BuildRequest( + "D", "zone", None, "job", "tenant", "pipeline", '1') executor_api.submit(br, {}) path_d = br.path - br = BuildRequest("E", "zone", "tenant", "pipeline", '1') + br = BuildRequest( + "E", "zone", None, "job", "tenant", "pipeline", '1') executor_api.submit(br, {}) path_e = br.path @@ -637,7 +646,8 @@ class TestExecutorApi(ZooKeeperBaseTestCase): # Test cleaning up orphaned request parameters executor_api = ExecutorApi(self.zk_client) - br = BuildRequest("A", "zone", "tenant", "pipeline", '1') + br = BuildRequest( + "A", "zone", None, "job", "tenant", "pipeline", '1') executor_api.submit(br, {}) params_root = executor_api.zone_queues['zone'].PARAM_ROOT @@ -675,7 +685,8 @@ class TestExecutorApi(ZooKeeperBaseTestCase): # Simulate the client side client = ExecutorApi(self.zk_client) client.submit( - BuildRequest("A", None, "tenant", "pipeline", '1'), {}) + BuildRequest( + "A", None, None, "job", "tenant", "pipeline", '1'), {}) # Simulate the server side server = ExecutorApi(self.zk_client, |