File indexing completed on 2024-06-07 02:29:35
0001
0002
0003 function die { cat log.txt; echo $1: status $2 ; exit $2; }
0004
0005 CONF=${SCRAM_TEST_PATH}/test_asyncservice_cfg.py
0006
0007 echo "cmsRun ${CONF}"
0008 cmsRun ${CONF} > log.txt 2>&1 || die "Failure using ${CONF}" $?
0009
0010
0011 echo "cmsRun ${CONF} --earlyTermination"
0012 cmsRun ${CONF} --earlyTermination > log.txt 2>&1
0013 RET=$?
0014 if [ "${RET}" == "0" ]; then
0015 cat log.txt
0016 die "${CONF} --earlyTermination succeeded while it was expected to fail" 1
0017 fi
0018 grep -q "ZombieKillerService" log.txt && die "${CONF} --earlyTermination was killed by ZombieKillerService, while the job should have failed by itself" 1
0019 grep -q "AsyncCallNotAllowed" log.txt || die "${CONF} --earlyTermination did not fail with AsyncCallNotAllowed" $?
0020 grep -q "Framework is shutting down, further run() calls are not allowed" log.txt || die "${CONF} --earlyTermination did not contain expected earlyTermination message" $?
0021
0022
0023
0024
0025 echo "cmsRun ${CONF} --exception"
0026 cmsRun ${CONF} --exception > log.txt 2>&1
0027 RET=$?
0028 if [ "${RET}" == "0" ]; then
0029 cat log.txt
0030 die "${CONF} --exception succeeded while it was expected to fail" 1
0031 fi
0032 grep -q "ZombieKillerService" log.txt && die "${CONF} --exception was killed by ZombieKillerService" 1
0033 grep -q "MoreExceptions: AfterModEndJob" log.txt && die "${CONF} --exception threw an unexpected exception in EndJob" 1
0034 grep -q "Intentional 'NotFound' exception for testing purposes" log.txt || die "${CONF} --exception failed in unexpected way" $?
0035
0036 exit 0