Skip to content

Commit 0e257f9

Browse files
Merge pull request #6945 from MetRonnie/cat-log-test
Fix cat-log test timing out
2 parents f9886d9 + ef41c18 commit 0e257f9

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

cylc/flow/remote.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,10 @@ def get_proc_ancestors():
8383
def watch_and_kill(proc):
8484
"""Kill proc if my PPID (etc.) changed - e.g. ssh connection dropped."""
8585
gpa = get_proc_ancestors()
86+
# Allow customising the interval to allow tests to run faster:
87+
interval = float(os.getenv('CYLC_PROC_POLL_INTERVAL', 60))
8688
while True:
87-
sleep(60)
89+
sleep(interval)
8890
if proc.poll() is not None:
8991
break
9092
if get_proc_ancestors() != gpa:

tests/functional/cylc-cat-log/12-delete-kill.t

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ __EOF__
3333
log_file="${WORKFLOW_RUN_DIR}/log/foo.log"
3434
echo "Hello, Mr. Thompson" > "$log_file"
3535

36+
export CYLC_PROC_POLL_INTERVAL=0.5
37+
3638
TEST_NAME="${TEST_NAME_BASE}-delete"
3739
cylc cat-log --mode=tail "$WORKFLOW_NAME" -f foo.log 2>&1 &
3840
cat_log_pid="$!"

0 commit comments

Comments
 (0)