Salome HOME
Small fixes in tests.
authorOvidiu Mircescu <ovidiu.mircescu@edf.fr>
Mon, 6 Sep 2021 15:06:22 +0000 (17:06 +0200)
committerOvidiu Mircescu <ovidiu.mircescu@edf.fr>
Mon, 6 Sep 2021 15:06:22 +0000 (17:06 +0200)
src/yacsloader/samples/wlm_2foreach.xml
src/yacsloader/samples/wlm_2foreach_with_cache.xml
src/yacsloader_swig/Test/testSaveLoadRun.py
src/yacsloader_swig/Test/testWorkloadManager.py

index 8225bf3bddf7ca319c255dc7b0ca4e3f94bb57c7..79709e88776cd36439ab1ea9637bb1e44cfc34d7 100644 (file)
@@ -84,7 +84,7 @@ time.sleep(1)
 time.sleep(1)
 ]]></code></script>
    </inline>
-   <foreach name="Create_c1_containers" nbranch="8" loopWeight="-1" type="int">
+   <foreach name="Create_c1_containers" nbranch="15" loopWeight="-1" type="int">
       <remote name="wait_c1" elementaryWeight="-1">
          <script><code><![CDATA[import time
 time.sleep(1)
@@ -169,7 +169,7 @@ time.sleep(1)
    </parameter>
    <parameter>
       <tonode>Create_c1_containers</tonode><toport>nbBranches</toport>
-      <value><int>8</int></value>
+      <value><int>15</int></value>
    </parameter>
    <parameter>
       <tonode>Create_c1_containers</tonode><toport>SmplsCollection</toport>
@@ -182,6 +182,13 @@ time.sleep(1)
 <value><int>6</int></value>
 <value><int>7</int></value>
 <value><int>8</int></value>
+<value><int>9</int></value>
+<value><int>10</int></value>
+<value><int>11</int></value>
+<value><int>12</int></value>
+<value><int>13</int></value>
+<value><int>14</int></value>
+<value><int>15</int></value>
 </data></array></value>
    </parameter>
    <presentation name="delay" x="511" y="53" width="158" height="36" expanded="1" expx="511" expy="53" expWidth="158" expHeight="36" shownState="0"/>
index e70df0c91f6fd6d733f48a2c802770121ad088b8..7f1b9bf6f434ce47d25769e7f5333bbad8bde5f5 100644 (file)
@@ -144,7 +144,7 @@ time.sleep(1)
          <outport name="result" type="pyobj"/>
       </remote>
    </foreach>
-   <foreach name="Create_C1_containers" nbranch="8" loopWeight="-1" type="int">
+   <foreach name="Create_C1_containers" nbranch="15" loopWeight="-1" type="int">
       <remote name="wait_c1" elementaryWeight="-1">
          <script><code><![CDATA[import time
 time.sleep(1)
@@ -231,7 +231,7 @@ time.sleep(1)
    </parameter>
    <parameter>
       <tonode>Create_C1_containers</tonode><toport>nbBranches</toport>
-      <value><int>8</int></value>
+      <value><int>15</int></value>
    </parameter>
    <parameter>
       <tonode>Create_C1_containers</tonode><toport>SmplsCollection</toport>
@@ -244,6 +244,13 @@ time.sleep(1)
 <value><int>6</int></value>
 <value><int>7</int></value>
 <value><int>8</int></value>
+<value><int>9</int></value>
+<value><int>10</int></value>
+<value><int>11</int></value>
+<value><int>12</int></value>
+<value><int>13</int></value>
+<value><int>14</int></value>
+<value><int>15</int></value>
 </data></array></value>
    </parameter>
    <parameter>
index 1c84f7666c4cc5ad542dd57490e2849de6ba6dda..963b04e51106079b1c5fb64a330111ecda809501 100755 (executable)
@@ -1750,8 +1750,7 @@ def str2Obj(strr):
   return pickle.loads(strr)
 
 salome.salome_init()
-#dsm=salome.naming_service.Resolve("/DataServerManager")
-dsm = salome.dsm
+dsm=salome.naming_service.Resolve("/DataServerManager")
 dss,isCreated=dsm.giveADataScopeTransactionCalled(scopeName)
 assert(not isCreated)
 
@@ -1781,8 +1780,7 @@ def str2Obj(strr):
   return pickle.loads(strr)
 
 salome.salome_init()
-#dsm=salome.naming_service.Resolve("/DataServerManager") #doesn't work in ssl
-dsm = salome.dsm # works in ssl
+dsm=salome.naming_service.Resolve("/DataServerManager")
 dss,isCreated=dsm.giveADataScopeTransactionCalled(scopeName)
 assert(not isCreated)
 time.sleep(3.)
index 965283530d3c5180d690df423ed06e4134bf1ecc..d1d610d43e933ffcc59cf37897c0103175282c50 100755 (executable)
@@ -36,12 +36,13 @@ class TestEdit(unittest.TestCase):
         self.l = loader.YACSLoader()
         self.e = pilot.ExecutorSwig()
         # We need a catalog which contains only one resource named "localhost"
-        # with 16 cores. The modifications made here are not saved to the
+        # with NB_NODE cores. The modifications made here are not saved to the
         # catalog file.
         salome.salome_init()
         resourceManager = salome.lcc.getResourcesManager()
         resource_definition = resourceManager.GetResourceDefinition("localhost")
         resource_definition.nb_node = NB_NODE
+        resource_definition.nb_proc_per_node = 1
         resourceManager.AddResource(resource_definition, False, "")
         resource_required = salome.ResourceParameters()
         resource_required.can_run_containers = True
@@ -51,6 +52,7 @@ class TestEdit(unittest.TestCase):
             resourceManager.RemoveResource(r, False, "")
         resource_definition = resourceManager.GetResourceDefinition("localhost")
         self.assertEqual(resource_definition.nb_node, NB_NODE)
+        self.assertEqual(resource_definition.nb_proc_per_node, 1)
 
     def tearDown(self):
         cm = salome.lcc.getContainerManager()