From 2d43b57b30c7a97052b444dd7318fef6c199dbdd Mon Sep 17 00:00:00 2001 From: =?utf8?q?Zden=C4=9Bk=20=C5=A0ustr?= Date: Tue, 25 May 2010 09:36:09 +0000 Subject: [PATCH] Distinguish between old and new notifications for the 1st job. --- .../LB/tests/lb-test-notif-switch.sh | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/org.glite.testsuites.ctb/LB/tests/lb-test-notif-switch.sh b/org.glite.testsuites.ctb/LB/tests/lb-test-notif-switch.sh index 0416f9d..e6040c7 100755 --- a/org.glite.testsuites.ctb/LB/tests/lb-test-notif-switch.sh +++ b/org.glite.testsuites.ctb/LB/tests/lb-test-notif-switch.sh @@ -155,6 +155,8 @@ else sleep 10 + #$SYS_CAT $$_notifications.txt + $SYS_GREP ${jobid} $$_notifications.txt > /dev/null if [ $? = 0 ]; then @@ -194,8 +196,19 @@ else kill $recpid + #$SYS_CAT $$_notifications.txt + + #There may be old notifications still arriving for the 1st job + $SYS_GREP ${jobid} $$_notifications.txt > $$_notifications_old.txt + $SYS_GREP -E "Waiting|Ready|Scheduled|Running" $$_notifications_old.txt >> /dev/null + + if [ $? = 0 ]; then + printf "Old notifications for the 1st job still arriving." + test_running + fi + #There should be no notifications for the 1st job - $SYS_GREP ${jobid} $$_notifications.txt >> /dev/null + $SYS_GREP ${jobid} $$_notifications_old.txt | $SYS_GREP -w "Done">> /dev/null if [ $? = 0 ]; then printf "Notifications for the old job were delivered" @@ -217,6 +230,7 @@ else fi $SYS_RM $$_notifications.txt + $SYS_RM $$_notifications_old.txt #Drop notification printf "Dropping the test notification (${notifid})" -- 1.8.2.3