- environment variables set:
 
      GLITE_LB_SERVER_PORT - if nondefault port (9000) is used
-     GLITE_LB_IL_SOCK - if nondevailt socket at /tmp/interlogger.sock is used
+     GLITE_LB_IL_SOCK - if nondefault socket at /tmp/interlogger.sock is used
      GLITE_LB_LOGGER_PORT - if nondefault port (9002) is used  
 
 Tests called:
 
                        print_error "Failed to register job"
                else
                        test_done
-               fi
 
-               jobstate=`${LBJOBSTATUS} ${jobid} | $SYS_GREP "state :" | ${SYS_AWK} '{print $3}'`
-               printf "Is the testing job ($jobid) in a correct state? $jobstate"
+                       # Check result
+                       jobstate=`${LBJOBSTATUS} ${jobid} | $SYS_GREP "state :" | ${SYS_AWK} '{print $3}'`
+                       printf "Is the testing job ($jobid) in a correct state? $jobstate"
+
+                       if [ "${jobstate}" = "Submitted" ]; then
+                               test_done
+                       else
+                               test_failed
+                               print_error "Job has not been submitted"
+                       fi
+
+                       #Purge test job
+                       joblist=$$_jobs_to_purge.txt
+                       echo $jobid > ${joblist}
+
+                       printf "Purging test job (Trying the best, result will not be tested)\n"
+
+                       ${LBPURGE} -j ${joblist}
+
+                       rm ${joblist}
+
 
-               if [ "${jobstate}" = "Submitted" ]; then
-                       test_done
-               else
-                       test_failed
-                       print_error "Job has not been submitted"
                fi
+
+               
+               
        fi
 fi