Salome HOME
Work on tests randomly failing.
authorOvidiu Mircescu <ovidiu.mircescu@edf.fr>
Fri, 19 Jun 2020 14:46:25 +0000 (16:46 +0200)
committerOvidiu Mircescu <ovidiu.mircescu@edf.fr>
Fri, 19 Jun 2020 14:46:25 +0000 (16:46 +0200)
src/runtime/PythonNode.cxx
src/runtime/SalomeContainerTools.cxx

index 579d49b8bf4ef2aad6fca55ccdfcef56499210d1..a7b850dbbd15eaf3468ed83bf665a95d17566234 100644 (file)
@@ -402,7 +402,7 @@ void PythonNode::executeRemote()
 {
   DEBTRACE( "++++++++++++++ PyNode::executeRemote: " << getName() << " ++++++++++++++++++++" );
   if(!_pyfuncSer)
-    throw Exception("DistributedPythonNode badly loaded");
+    throw Exception("PythonNode badly loaded");
   //
   if(dynamic_cast<HomogeneousPoolContainer *>(getContainer()))
     {
index 7cbaacce61c1b17ac7e61b58a18b1d2a8c370777..6cc052191b4088c6f05fef771832c916dd389550 100644 (file)
@@ -396,27 +396,33 @@ void SalomeContainerToolsBase::Start(const std::vector<std::string>& compoNames,
         }
     }
 
-  if(CORBA::is_nil(trueCont))
-    try
-  {
-        // --- GiveContainer is used in batch mode to retreive launched containers,
-        //     and is equivalent to StartContainer when not in batch.
-        trueCont=contManager->GiveContainer(myparams);
-  }
-  catch( const SALOME::SALOME_Exception& ex )
-  {
-      std::string msg="SalomeContainer::start : Unable to launch container in Salome : ";
-      msg += '\n';
-      msg += ex.details.text.in();
-      throw Exception(msg);
-  }
-  catch(CORBA::COMM_FAILURE&)
-  {
-      throw Exception("SalomeContainer::start : Unable to launch container in Salome : CORBA Comm failure detected");
-  }
-  catch(CORBA::Exception&)
+  int nbTries=0;
+  while(CORBA::is_nil(trueCont))
   {
-      throw Exception("SalomeContainer::start : Unable to launch container in Salome : Unexpected CORBA failure detected");
+    try
+    {
+          // --- GiveContainer is used in batch mode to retreive launched containers,
+          //     and is equivalent to StartContainer when not in batch.
+          trueCont=contManager->GiveContainer(myparams);
+    }
+    catch( const SALOME::SALOME_Exception& ex )
+    {
+        std::string msg="SalomeContainer::start : Unable to launch container in Salome : ";
+        msg += '\n';
+        msg += ex.details.text.in();
+        throw Exception(msg);
+    }
+    catch(CORBA::COMM_FAILURE&)
+    {
+      std::cerr << "SalomeContainer::start : CORBA Comm failure detected. Make another try!" << std::endl;
+      nbTries++;
+      if(nbTries > 5)
+        throw Exception("SalomeContainer::start : Unable to launch container in Salome : CORBA Comm failure detected");
+    }
+    catch(CORBA::Exception&)
+    {
+        throw Exception("SalomeContainer::start : Unable to launch container in Salome : Unexpected CORBA failure detected");
+    }
   }
 
   if(CORBA::is_nil(trueCont))
@@ -546,4 +552,4 @@ Engines::ContainerParameters SalomeContainerToolsDecorator::getParameters() cons
   std::string zeMachine(_pg->deduceMachineFrom(iPos,nbProcPerNode));
   ret.resource_params.hostname=CORBA::string_dup(zeMachine.c_str());
   return ret;
-}
\ No newline at end of file
+}