Salome HOME
Added constants to represent job status uniformly. Fixed some errors under Windows...
[tools/libbatch.git] / src / Local / Test / Test_Local_RSH.cxx
index 8e5dc12db36bf3fdfb72b3d13a0fa932ba5ecf31..ff2dc82c0b8b71c84701e4258ad1e34074f72641 100644 (file)
@@ -102,14 +102,14 @@ int main(int argc, char** argv)
 
     // Wait for the end of the job
     string state = "Unknown";
-    for (int i=0 ; i<timeout*10 && state != "Done" ; i++) {
+    for (int i=0 ; i<timeout*10 && state != FINISHED && state != FAILED ; i++) {
       usleep(100000);
       Versatile paramState = jobid.queryJob().getParametre()["STATE"];
       state = (paramState.size() > 0) ? paramState.str() : "Unknown";
       cout << "Job state is: " << state << endl;
     }
 
-    if (state != "Done") {
+    if (state != FINISHED && state != FAILED) {
       cerr << "Error: Job not finished after timeout" << endl;
       return 1;
     }