From: Zdeněk Šustr Date: Tue, 12 Oct 2010 08:34:51 +0000 (+0000) Subject: Collection purge test added. X-Git-Tag: gridsite-core_R_1_7_7~5 X-Git-Url: http://scientific.zcu.cz/git/?a=commitdiff_plain;h=d21dad0dc22743831d455aa5f1ed30d549b70939;p=jra1mw.git Collection purge test added. --- diff --git a/org.glite.testsuites.ctb/LB/tests/lb-test-event-delivery.sh b/org.glite.testsuites.ctb/LB/tests/lb-test-event-delivery.sh index 4398e4d..8b6291e 100755 --- a/org.glite.testsuites.ctb/LB/tests/lb-test-event-delivery.sh +++ b/org.glite.testsuites.ctb/LB/tests/lb-test-event-delivery.sh @@ -252,6 +252,51 @@ else test_failed print_error "State ${jobstate}: Job is not in appropriate state (Cleared)" fi + + echo $jobid > $$_jobs_to_purge_test.txt + + printf "Purging collection... " + + $LBPURGE -j $$_jobs_to_purge_test.txt + + printf "Sleeping for 10 seconds... " + + sleep 10 + + printf "Checking state of collection... " + + jobstate=`${LBJOBSTATUS} $jobid | ${SYS_GREP} -E "^state :" | ${SYS_AWK} '{print $3}'` + if [ "${jobstate}" = "Purged" ]; then + printf "${jobstate}" + test_done + + printf "Checking state of subjob #1... " + jobstate=`${LBJOBSTATUS} ${subjobs[0]} | ${SYS_GREP} -E "^state :" | ${SYS_AWK} '{print $3}'` + if [ "${jobstate}" = "Purged" ]; then + printf "${jobstate}" + test_done + else + test_failed + print_error "State ${jobstate}: Job is not in appropriate state (Cleared)" + fi + + printf "Checking state of subjob #2... " + jobstate=`${LBJOBSTATUS} ${subjobs[1]} | ${SYS_GREP} -E "^state :" | ${SYS_AWK} '{print $3}'` + if [ "${jobstate}" = "Purged" ]; then + printf "${jobstate}" + test_done + else + test_failed + print_error "State ${jobstate}: Job is not in appropriate state (Cleared)" + fi + + else + printf "${jobstate}" + test_skipped + fi + + $SYS_RM $$_jobs_to_purge_test.txt + fi echo ${subjobs[0]} >> ${joblist}