Skip to content

Commit

Permalink
Improve flaky test
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewrmshin committed Aug 14, 2019
1 parent 003b65a commit 1cd52ce
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 5 deletions.
1 change: 1 addition & 0 deletions flakytests/cylc-show/00-simple/reference.log
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@
2017-12-12T17:43:38Z INFO - [show-taskinstance.20141106T0900Z] -triggered off ['foo.20141106T0900Z']
2017-12-12T17:43:38Z INFO - [show-task.20141106T0900Z] -triggered off ['foo.20141106T0900Z']
2017-12-12T17:43:38Z INFO - [show-suite.20141106T0900Z] -triggered off ['foo.20141106T0900Z']
2017-12-12T17:43:38Z INFO - [end.20141106T0900Z] -triggered off ['show-suite-json.20141106T0900Z', 'show-suite.20141106T0900Z', 'show-task-json.20141106T0900Z', 'show-task.20141106T0900Z', 'show-taskinstance-json.20141106T0900Z', 'show-taskinstance.20141106T0900Z']
24 changes: 19 additions & 5 deletions flakytests/cylc-show/00-simple/suite.rc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
[meta]
title = a test suite
description = the quick brown fox
custom = custard
custom = custard
[cylc]
UTC mode = True
[scheduling]
Expand All @@ -11,31 +11,45 @@
[[graph]]
PT1H = """
bar => foo
foo:start => show-suite & show-task & show-taskinstance & \
show-suite-json & show-task-json & show-taskinstance-json
foo:start => SHOW
SHOW:finish-all => end
"""
[runtime]
[[foo]]
script = sleep 10
script = """
touch 'foot'
while [[ -e 'foot' ]]; do
sleep 1
done
"""
[[[meta]]]
title = a task
description = jumped over the lazy dog
baz = pub
[[bar,baz]]
[[bar]]
script = true
[[end]]
script = rm -f '../foo/foot'
[[SHOW]]
[[show-suite]]
inherit = SHOW
script = cylc show "$CYLC_SUITE_NAME" >>{{ TEST_OUTPUT_PATH }}-suite
[[show-task]]
inherit = SHOW
script = cylc show "$CYLC_SUITE_NAME" foo >>{{ TEST_OUTPUT_PATH }}-task
[[show-taskinstance]]
inherit = SHOW
script = cylc show "$CYLC_SUITE_NAME" foo.20141106T0900Z \
>>{{ TEST_OUTPUT_PATH }}-taskinstance
[[show-suite-json]]
inherit = SHOW
script = cylc show --json "$CYLC_SUITE_NAME" \
>>{{ TEST_OUTPUT_PATH }}-json-suite
[[show-task-json]]
inherit = SHOW
script = cylc show --json "$CYLC_SUITE_NAME" foo \
>>{{ TEST_OUTPUT_PATH }}-json-task
[[show-taskinstance-json]]
inherit = SHOW
script = cylc show --json "$CYLC_SUITE_NAME" foo.20141106T0900Z \
>>{{ TEST_OUTPUT_PATH }}-json-taskinstance

0 comments on commit 1cd52ce

Please sign in to comment.