diff --git a/tests/functional/graphql/02-root-queries.t b/tests/functional/graphql/02-root-queries.t index 6090975f419..c6dfe0ba3da 100755 --- a/tests/functional/graphql/02-root-queries.t +++ b/tests/functional/graphql/02-root-queries.t @@ -38,7 +38,7 @@ query { job(id: \"${USER}${ID_DELIM}${WORKFLOW_NAME}${ID_DELIM}20190101T00${ID_DELIM}foo${ID_DELIM}1\") { id } - jobs(workflows: [\"*${ID_DELIM}*\"], ids: [\"*${ID_DELIM}*${ID_DELIM}1\"], sort: {keys: [\"id\"], reverse: false}) { + jobs(workflows: [\"*${ID_DELIM}*\"], ids: [\"*${ID_DELIM}*${ID_DELIM}1\"], submit_time, sort: {keys: [\"id\"], reverse: false}) { id } task(id: \"${USER}${ID_DELIM}${WORKFLOW_NAME}${ID_DELIM}foo\") { diff --git a/tests/functional/graphql/03-is-held-arg.t b/tests/functional/graphql/03-is-held-arg.t index fc7c8ca9353..7f17ab59756 100755 --- a/tests/functional/graphql/03-is-held-arg.t +++ b/tests/functional/graphql/03-is-held-arg.t @@ -49,8 +49,12 @@ query { workflows { name isHeldTotal - taskProxies(isHeld: false) { + taskProxies(isHeld: true) { id + jobs { + submittedTime + startedTime + } } familyProxies(exids: [\"root\"], isHeld: true) { id @@ -69,14 +73,28 @@ run_ok "${TEST_NAME_BASE}-contact" cylc get-contact "${WORKFLOW_NAME}" # stop workflow cylc stop --max-polls=10 --interval=2 --kill "${WORKFLOW_NAME}" +RESPONSE="${TEST_NAME_BASE}-is-held-arg.stdout" +perl -pi -e 's/("submittedTime":).*$/${1} "blargh",/' "${RESPONSE}" +perl -pi -e 's/("startedTime":).*$/${1} "blargh"/' "${RESPONSE}" + # compare to expectation -cmp_json "${TEST_NAME}-out" "${TEST_NAME_BASE}-is-held-arg.stdout" << __HERE__ +cmp_json "${TEST_NAME}-out" "$RESPONSE" << __HERE__ { "workflows": [ { "name": "${WORKFLOW_NAME}", "isHeldTotal": 1, - "taskProxies": [], + "taskProxies": [ + { + "id": "${USER}${ID_DELIM}${WORKFLOW_NAME}${ID_DELIM}1${ID_DELIM}foo", + "jobs": [ + { + "submittedTime": "blargh", + "startedTime": "blargh" + } + ] + } + ], "familyProxies": [ { "id": "${USER}${ID_DELIM}${WORKFLOW_NAME}${ID_DELIM}1${ID_DELIM}BAZ" diff --git a/tests/functional/lib/python/diffr.py b/tests/functional/lib/python/diffr.py index 179e90a68e7..fcc650a3cf2 100644 --- a/tests/functional/lib/python/diffr.py +++ b/tests/functional/lib/python/diffr.py @@ -224,8 +224,8 @@ def load_json(file1, file2=None): """ try: this = json.loads(file1) - except json.decoder.JSONDecodeError: - sys.exit('Syntax error in file1') + except json.decoder.JSONDecodeError as exc: + sys.exit(f'Syntax error in file1: {exc}') raise try: @@ -233,8 +233,8 @@ def load_json(file1, file2=None): that = json.loads(file2) else: that = json.load(sys.stdin) - except json.decoder.JSONDecodeError: - sys.exit('Syntax error in file2') + except json.decoder.JSONDecodeError as exc: + sys.exit(f'Syntax error in file2: {exc}') raise return this, that