Skip to content

Commit ca1950b

Browse files
committed
[python] More refinement of integration tests.
The additional prints should help narrow down test failures. The added wait_for_deployment_status is a little harder to defend, but it might help too. Signed-off-by: Ben Pfaff <blp@feldera.com>
1 parent be031fe commit ca1950b

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

python/tests/platform/helper.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,7 @@ def wait_for_deployment_status(
127127
- If 'desired' is a function, until it returns true when passed
128128
the deployment status.
129129
"""
130+
print(f"Waiting up to {timeout_s} seconds for {name} to transition to {desired}")
130131
start = time.time()
131132
deadline = start + timeout_s
132133
last = None

python/tests/platform/test_pipeline_lifecycle.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,13 @@ def test_pipeline_stop_force_after_start(pipeline_name):
187187
create_pipeline(pipeline_name, "CREATE TABLE t1(c1 INTEGER);")
188188

189189
for delay_sec in [0, 0.1, 0.5, 1, 3, 10]:
190+
print(f"Testing with {delay_sec} second delay")
190191
start_pipeline(pipeline_name)
192+
# Wait for the pipeline to transition away from "Stopped"
193+
#
194+
# See big comment in test_pipeline_stop_with_force for
195+
# reasoning.
196+
wait_for_deployment_status(pipeline_name, lambda status: status != "Stopped")
191197
# Shortly wait for the pipeline to transition to next state(s)
192198
time.sleep(delay_sec)
193199
# Stop force and clear the pipeline

0 commit comments

Comments
 (0)