Salome HOME
Improve test stability.
authorOvidiu Mircescu <ovidiu.mircescu@edf.fr>
Mon, 10 May 2021 14:58:16 +0000 (16:58 +0200)
committerOvidiu Mircescu <ovidiu.mircescu@edf.fr>
Mon, 10 May 2021 14:58:16 +0000 (16:58 +0200)
src/yacsloader/samples/wlm_2foreach.xml
src/yacsloader/samples/wlm_2foreach_with_cache.xml
src/yacsloader/samples/wlm_8nodes.xml
src/yacsloader_swig/Test/testSaveLoadRun.py
src/yacsloader_swig/Test/testWorkloadManager.py

index 65f5e8c8f72d6bf1e97a8b61826ebe19853b1bcd..8225bf3bddf7ca319c255dc7b0ca4e3f94bb57c7 100644 (file)
@@ -79,30 +79,57 @@ time.sleep(1)
          <inport name="v" type="int"/>
       </remote>
    </foreach>
+   <inline name="delay">
+      <script><code><![CDATA[import time
+time.sleep(1)
+]]></code></script>
+   </inline>
+   <foreach name="Create_c1_containers" nbranch="8" loopWeight="-1" type="int">
+      <remote name="wait_c1" elementaryWeight="-1">
+         <script><code><![CDATA[import time
+time.sleep(1)
+]]></code></script>
+         <load container="c1"/>
+         <inport name="x" type="int"/>
+      </remote>
+   </foreach>
+   <foreach name="Create_c2_containers" nbranch="3" loopWeight="-1" type="int">
+      <remote name="PyScript5" elementaryWeight="-1">
+         <script><code><![CDATA[import time
+time.sleep(1)
+]]></code></script>
+         <load container="c2"/>
+         <inport name="x" type="int"/>
+      </remote>
+   </foreach>
    <control> <fromnode>Begin</fromnode> <tonode>ForEach1</tonode> </control>
    <control> <fromnode>Begin</fromnode> <tonode>ForEach2</tonode> </control>
    <control> <fromnode>Begin</fromnode> <tonode>End</tonode> </control>
+   <control> <fromnode>Begin</fromnode> <tonode>delay</tonode> </control>
    <control> <fromnode>ForEach1</fromnode> <tonode>End</tonode> </control>
    <control> <fromnode>ForEach2</fromnode> <tonode>End</tonode> </control>
+   <control> <fromnode>delay</fromnode> <tonode>ForEach1</tonode> </control>
+   <control> <fromnode>Create_c1_containers</fromnode> <tonode>Create_c2_containers</tonode> </control>
+   <control> <fromnode>Create_c2_containers</fromnode> <tonode>Begin</tonode> </control>
    <datalink control="false">
       <fromnode>Begin</fromnode> <fromport>t0</fromport>
       <tonode>End</tonode> <toport>t0</toport>
    </datalink>
    <datalink control="false">
       <fromnode>Begin</fromnode> <fromport>vals</fromport>
-      <tonode>ForEach1</tonode> <toport>SmplsCollection</toport>
+      <tonode>ForEach2</tonode> <toport>SmplsCollection</toport>
    </datalink>
    <datalink control="false">
       <fromnode>Begin</fromnode> <fromport>vals</fromport>
-      <tonode>ForEach2</tonode> <toport>SmplsCollection</toport>
+      <tonode>ForEach1</tonode> <toport>SmplsCollection</toport>
    </datalink>
    <datalink control="false">
       <fromnode>Begin</fromnode> <fromport>nbbranches</fromport>
-      <tonode>ForEach2</tonode> <toport>nbBranches</toport>
+      <tonode>ForEach1</tonode> <toport>nbBranches</toport>
    </datalink>
    <datalink control="false">
       <fromnode>Begin</fromnode> <fromport>nbbranches</fromport>
-      <tonode>ForEach1</tonode> <toport>nbBranches</toport>
+      <tonode>ForEach2</tonode> <toport>nbBranches</toport>
    </datalink>
    <datalink control="false">
       <fromnode>ForEach1</fromnode> <fromport>evalSamples</fromport>
@@ -112,19 +139,61 @@ time.sleep(1)
       <fromnode>ForEach2</fromnode> <fromport>evalSamples</fromport>
       <tonode>ForEach2.PyScript7</tonode> <toport>v</toport>
    </datalink>
+   <datalink control="false">
+      <fromnode>Create_c1_containers</fromnode> <fromport>evalSamples</fromport>
+      <tonode>Create_c1_containers.wait_c1</tonode> <toport>x</toport>
+   </datalink>
+   <datalink control="false">
+      <fromnode>Create_c2_containers</fromnode> <fromport>evalSamples</fromport>
+      <tonode>Create_c2_containers.PyScript5</tonode> <toport>x</toport>
+   </datalink>
    <parameter>
-      <tonode>ForEach1</tonode><toport>nbBranches</toport>
+      <tonode>ForEach2</tonode><toport>nbBranches</toport>
       <value><int>1</int></value>
    </parameter>
    <parameter>
-      <tonode>ForEach2</tonode><toport>nbBranches</toport>
+      <tonode>Create_c2_containers</tonode><toport>nbBranches</toport>
+      <value><int>3</int></value>
+   </parameter>
+   <parameter>
+      <tonode>Create_c2_containers</tonode><toport>SmplsCollection</toport>
+      <value><array><data>
+<value><int>1</int></value>
+<value><int>2</int></value>
+<value><int>3</int></value>
+</data></array></value>
+   </parameter>
+   <parameter>
+      <tonode>ForEach1</tonode><toport>nbBranches</toport>
       <value><int>1</int></value>
    </parameter>
-   <presentation name="ForEach1" x="201.5" y="146" width="171.5" height="155" expanded="1" expx="201.5" expy="146" expWidth="171.5" expHeight="155" shownState="0"/>
-   <presentation name="ForEach1.PyScript6" x="9.5" y="88" width="158" height="63" expanded="1" expx="9.5" expy="88" expWidth="158" expHeight="63" shownState="0"/>
+   <parameter>
+      <tonode>Create_c1_containers</tonode><toport>nbBranches</toport>
+      <value><int>8</int></value>
+   </parameter>
+   <parameter>
+      <tonode>Create_c1_containers</tonode><toport>SmplsCollection</toport>
+      <value><array><data>
+<value><int>1</int></value>
+<value><int>2</int></value>
+<value><int>3</int></value>
+<value><int>4</int></value>
+<value><int>5</int></value>
+<value><int>6</int></value>
+<value><int>7</int></value>
+<value><int>8</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"/>
    <presentation name="ForEach2.PyScript7" x="13" y="92" width="158" height="63" expanded="1" expx="13" expy="92" expWidth="158" expHeight="63" shownState="0"/>
-   <presentation name="ForEach2" x="204" y="313.5" width="175" height="159" expanded="1" expx="204" expy="313.5" expWidth="175" expHeight="159" shownState="0"/>
-   <presentation name="End" x="402.5" y="85" width="158" height="63" expanded="1" expx="402.5" expy="85" expWidth="158" expHeight="63" shownState="0"/>
-   <presentation name="Begin" x="9" y="86" width="158" height="117" expanded="1" expx="9" expy="86" expWidth="158" expHeight="117" shownState="0"/>
-   <presentation name="__ROOT__" x="0" y="0" width="564.5" height="476.5" expanded="1" expx="0" expy="0" expWidth="564.5" expHeight="476.5" shownState="0"/>
+   <presentation name="ForEach1.PyScript6" x="9.5" y="88" width="158" height="63" expanded="1" expx="9.5" expy="88" expWidth="158" expHeight="63" shownState="0"/>
+   <presentation name="Begin" x="360.5" y="101.5" width="158" height="117" expanded="1" expx="360.5" expy="101.5" expWidth="158" expHeight="117" shownState="0"/>
+   <presentation name="ForEach2" x="566" y="271" width="175" height="159" expanded="1" expx="566" expy="271" expWidth="175" expHeight="159" shownState="0"/>
+   <presentation name="Create_c1_containers.wait_c1" x="4" y="100" width="158" height="63" expanded="1" expx="4" expy="100" expWidth="158" expHeight="63" shownState="0"/>
+   <presentation name="Create_c2_containers.PyScript5" x="14" y="99" width="158" height="63" expanded="1" expx="14" expy="99" expWidth="158" expHeight="63" shownState="0"/>
+   <presentation name="End" x="778.5" y="99" width="158" height="63" expanded="1" expx="778.5" expy="99" expWidth="158" expHeight="63" shownState="0"/>
+   <presentation name="Create_c2_containers" x="180" y="101" width="176" height="166" expanded="1" expx="180" expy="101" expWidth="176" expHeight="166" shownState="0"/>
+   <presentation name="ForEach1" x="566" y="103.5" width="171.5" height="155" expanded="1" expx="566" expy="103.5" expWidth="171.5" expHeight="155" shownState="0"/>
+   <presentation name="Create_c1_containers" x="4" y="101" width="166" height="167" expanded="1" expx="4" expy="101" expWidth="166" expHeight="167" shownState="0"/>
+   <presentation name="__ROOT__" x="0" y="0" width="940.5" height="434" expanded="1" expx="0" expy="0" expWidth="940.5" expHeight="434" shownState="0"/>
 </proc>
index 4bda1d82c4f91b92beb355d5ceb91f8e10b95a4e..e70df0c91f6fd6d733f48a2c802770121ad088b8 100644 (file)
@@ -51,6 +51,7 @@ vals = [ i for i in range(40)]
 nbbranches = len(vals)
 t0=time.time()
 ]]></code></script>
+      <load container="DefaultContainer"/>
       <outport name="t0" type="pyobj"/>
       <outport name="vals" type="intvec"/>
       <outport name="nbbranches" type="int"/>
@@ -62,7 +63,7 @@ total_time=int(tf-t0)
 
 ok = True
 s_expected = sum(vals)
-
+err_message = ""
 tr1={}
 for cont_name, s in r1:
     if cont_name in tr1.keys():
@@ -75,9 +76,9 @@ for cont_name, s in r1:
 s1 = sum(tr1.values())
 if s_expected != s1:
     ok = False
-    print("Error on the first foreach.")
-    print("Expected sum:", s_expected)
-    print("Obtained sum:", s1)
+    err_message += "Error on the first foreach.\n"
+    err_message += "Expected sum:{}\n".format(s_expected)
+    err_message += "Obtained sum:{}\n".format(s1)
 
 tr2={}
 for cont_name, s in r2:
@@ -91,14 +92,15 @@ for cont_name, s in r2:
 s2 = sum(tr2.values())
 if s_expected != s2:
     ok = False
-    print("Error on the second foreach.")
-    print("Expected sum:", s_expected)
-    print("Obtained sum:", s2)
+    err_message += "Error on the second foreach.\n"
+    err_message += "Expected sum:{}\n".format(s_expected)
+    err_message += "Obtained sum:{}\n".format(s2)
 
 coeff_cont = len(tr1) + ( 4 * len(tr2))
-#print(r1)
-#print(r2)
+print("total_time:", total_time)
+print(err_message)
 ]]></code></script>
+      <load container="DefaultContainer"/>
       <inport name="t0" type="pyobj"/>
       <inport name="r1" type="seqpyobj"/>
       <inport name="r2" type="seqpyobj"/>
@@ -106,6 +108,7 @@ coeff_cont = len(tr1) + ( 4 * len(tr2))
       <outport name="total_time" type="int"/>
       <outport name="ok" type="bool"/>
       <outport name="coeff_cont" type="int"/>
+      <outport name="err_message" type="string"/>
    </inline>
    <foreach name="ForEach1" nbranch="1" loopWeight="-1" type="int">
       <remote name="PyNode1" elementaryWeight="-1">
@@ -141,34 +144,62 @@ time.sleep(1)
          <outport name="result" type="pyobj"/>
       </remote>
    </foreach>
+   <foreach name="Create_C1_containers" nbranch="8" loopWeight="-1" type="int">
+      <remote name="wait_c1" elementaryWeight="-1">
+         <script><code><![CDATA[import time
+time.sleep(1)
+]]></code></script>
+         <load container="c1"/>
+         <inport name="x" type="int"/>
+      </remote>
+   </foreach>
+   <foreach name="Create_C2_containers" nbranch="3" loopWeight="-1" type="int">
+      <remote name="wait_c2" elementaryWeight="-1">
+         <script><code><![CDATA[import time
+time.sleep(1)
+]]></code></script>
+         <load container="c2"/>
+         <inport name="x" type="int"/>
+      </remote>
+   </foreach>
+   <inline name="delay">
+      <script><code><![CDATA[import time
+time.sleep(1)
+]]></code></script>
+      <load container="DefaultContainer"/>
+   </inline>
    <control> <fromnode>Begin</fromnode> <tonode>ForEach1</tonode> </control>
    <control> <fromnode>Begin</fromnode> <tonode>ForEach2</tonode> </control>
    <control> <fromnode>Begin</fromnode> <tonode>End</tonode> </control>
+   <control> <fromnode>Begin</fromnode> <tonode>delay</tonode> </control>
    <control> <fromnode>ForEach1</fromnode> <tonode>End</tonode> </control>
    <control> <fromnode>ForEach2</fromnode> <tonode>End</tonode> </control>
+   <control> <fromnode>Create_C1_containers</fromnode> <tonode>Create_C2_containers</tonode> </control>
+   <control> <fromnode>Create_C2_containers</fromnode> <tonode>Begin</tonode> </control>
+   <control> <fromnode>delay</fromnode> <tonode>ForEach1</tonode> </control>
    <datalink control="false">
       <fromnode>Begin</fromnode> <fromport>t0</fromport>
       <tonode>End</tonode> <toport>t0</toport>
    </datalink>
    <datalink control="false">
       <fromnode>Begin</fromnode> <fromport>vals</fromport>
-      <tonode>ForEach2</tonode> <toport>SmplsCollection</toport>
+      <tonode>ForEach1</tonode> <toport>SmplsCollection</toport>
    </datalink>
    <datalink control="false">
       <fromnode>Begin</fromnode> <fromport>vals</fromport>
-      <tonode>ForEach1</tonode> <toport>SmplsCollection</toport>
+      <tonode>End</tonode> <toport>vals</toport>
    </datalink>
    <datalink control="false">
       <fromnode>Begin</fromnode> <fromport>vals</fromport>
-      <tonode>End</tonode> <toport>vals</toport>
+      <tonode>ForEach2</tonode> <toport>SmplsCollection</toport>
    </datalink>
    <datalink control="false">
       <fromnode>Begin</fromnode> <fromport>nbbranches</fromport>
-      <tonode>ForEach2</tonode> <toport>nbBranches</toport>
+      <tonode>ForEach1</tonode> <toport>nbBranches</toport>
    </datalink>
    <datalink control="false">
       <fromnode>Begin</fromnode> <fromport>nbbranches</fromport>
-      <tonode>ForEach1</tonode> <toport>nbBranches</toport>
+      <tonode>ForEach2</tonode> <toport>nbBranches</toport>
    </datalink>
    <datalink control="false">
       <fromnode>ForEach1</fromnode> <fromport>evalSamples</fromport>
@@ -178,6 +209,14 @@ time.sleep(1)
       <fromnode>ForEach2</fromnode> <fromport>evalSamples</fromport>
       <tonode>ForEach2.PyNode2</tonode> <toport>v</toport>
    </datalink>
+   <datalink control="false">
+      <fromnode>Create_C1_containers</fromnode> <fromport>evalSamples</fromport>
+      <tonode>Create_C1_containers.wait_c1</tonode> <toport>x</toport>
+   </datalink>
+   <datalink control="false">
+      <fromnode>Create_C2_containers</fromnode> <fromport>evalSamples</fromport>
+      <tonode>Create_C2_containers.wait_c2</tonode> <toport>x</toport>
+   </datalink>
    <datalink control="false">
       <fromnode>ForEach1.PyNode1</fromnode> <fromport>result</fromport>
       <tonode>End</tonode> <toport>r1</toport>
@@ -187,18 +226,52 @@ time.sleep(1)
       <tonode>End</tonode> <toport>r2</toport>
    </datalink>
    <parameter>
-      <tonode>ForEach2</tonode><toport>nbBranches</toport>
+      <tonode>ForEach1</tonode><toport>nbBranches</toport>
       <value><int>1</int></value>
    </parameter>
    <parameter>
-      <tonode>ForEach1</tonode><toport>nbBranches</toport>
+      <tonode>Create_C1_containers</tonode><toport>nbBranches</toport>
+      <value><int>8</int></value>
+   </parameter>
+   <parameter>
+      <tonode>Create_C1_containers</tonode><toport>SmplsCollection</toport>
+      <value><array><data>
+<value><int>1</int></value>
+<value><int>2</int></value>
+<value><int>3</int></value>
+<value><int>4</int></value>
+<value><int>5</int></value>
+<value><int>6</int></value>
+<value><int>7</int></value>
+<value><int>8</int></value>
+</data></array></value>
+   </parameter>
+   <parameter>
+      <tonode>Create_C2_containers</tonode><toport>nbBranches</toport>
+      <value><int>3</int></value>
+   </parameter>
+   <parameter>
+      <tonode>Create_C2_containers</tonode><toport>SmplsCollection</toport>
+      <value><array><data>
+<value><int>1</int></value>
+<value><int>2</int></value>
+<value><int>3</int></value>
+</data></array></value>
+   </parameter>
+   <parameter>
+      <tonode>ForEach2</tonode><toport>nbBranches</toport>
       <value><int>1</int></value>
    </parameter>
+   <presentation name="delay" x="466" y="60" width="158" height="36" expanded="1" expx="466" expy="60" expWidth="158" expHeight="36" shownState="0"/>
+   <presentation name="Create_C2_containers.wait_c2" x="7" y="89" width="158" height="63" expanded="1" expx="7" expy="89" expWidth="158" expHeight="63" shownState="0"/>
+   <presentation name="Begin" x="362.5" y="133" width="158" height="117" expanded="1" expx="362.5" expy="133" expWidth="158" expHeight="117" shownState="0"/>
+   <presentation name="End" x="833.5" y="137" width="158" height="144" expanded="1" expx="833.5" expy="137" expWidth="158" expHeight="144" shownState="0"/>
+   <presentation name="ForEach1" x="587.5" y="123.5" width="171.5" height="155" expanded="1" expx="587.5" expy="123.5" expWidth="171.5" expHeight="155" shownState="0"/>
+   <presentation name="Create_C1_containers.wait_c1" x="6" y="97" width="158" height="63" expanded="1" expx="6" expy="97" expWidth="158" expHeight="63" shownState="0"/>
+   <presentation name="Create_C1_containers" x="4" y="133" width="168" height="164" expanded="1" expx="4" expy="133" expWidth="168" expHeight="164" shownState="0"/>
    <presentation name="ForEach1.PyNode1" x="9.5" y="88" width="158" height="63" expanded="1" expx="9.5" expy="88" expWidth="158" expHeight="63" shownState="0"/>
-   <presentation name="ForEach2" x="204" y="313.5" width="175" height="159" expanded="1" expx="204" expy="313.5" expWidth="175" expHeight="159" shownState="0"/>
-   <presentation name="ForEach1" x="201.5" y="146" width="171.5" height="155" expanded="1" expx="201.5" expy="146" expWidth="171.5" expHeight="155" shownState="0"/>
-   <presentation name="End" x="402.5" y="85" width="158" height="144" expanded="1" expx="402.5" expy="85" expWidth="158" expHeight="144" shownState="0"/>
-   <presentation name="Begin" x="9" y="86" width="158" height="117" expanded="1" expx="9" expy="86" expWidth="158" expHeight="117" shownState="0"/>
    <presentation name="ForEach2.PyNode2" x="13" y="92" width="158" height="63" expanded="1" expx="13" expy="92" expWidth="158" expHeight="63" shownState="0"/>
-   <presentation name="__ROOT__" x="0" y="0" width="564.5" height="476.5" expanded="1" expx="0" expy="0" expWidth="564.5" expHeight="476.5" shownState="0"/>
+   <presentation name="Create_C2_containers" x="187" y="133" width="169" height="156" expanded="1" expx="187" expy="133" expWidth="169" expHeight="156" shownState="0"/>
+   <presentation name="ForEach2" x="587" y="283" width="175" height="159" expanded="1" expx="587" expy="283" expWidth="175" expHeight="159" shownState="0"/>
+   <presentation name="__ROOT__" x="0" y="0" width="995.5" height="446" expanded="1" expx="0" expy="0" expWidth="995.5" expHeight="446" shownState="0"/>
 </proc>
index 7dfaca76718932e9498b4cab4f48f78856459441..c178717f46b8a4e2e19be5887d6b16120b7e8cd5 100644 (file)
@@ -20,6 +20,7 @@
    <objref name="pyobj" id="python:obj:1.0"/>
    <sequence name="seqboolvec" content="boolvec"/>
    <sequence name="seqdblevec" content="dblevec"/>
+   <sequence name="seqint" content="int"/>
    <sequence name="seqintvec" content="intvec"/>
    <sequence name="seqpyobj" content="pyobj"/>
    <sequence name="stringvec" content="string"/>
@@ -155,6 +156,15 @@ container_name = my_container.name
       <inport name="time_to_sleep" type="int"/>
       <outport name="container_name" type="string"/>
    </remote>
+   <foreach name="Create_containers" nbranch="8" loopWeight="-1" type="int">
+      <remote name="wait_container" elementaryWeight="-1">
+         <script><code><![CDATA[import time
+time.sleep(1)
+]]></code></script>
+         <load container="cont"/>
+         <inport name="x" type="int"/>
+      </remote>
+   </foreach>
    <control> <fromnode>Begin</fromnode> <tonode>End</tonode> </control>
    <control> <fromnode>Begin</fromnode> <tonode>n1</tonode> </control>
    <control> <fromnode>Begin</fromnode> <tonode>n2</tonode> </control>
@@ -172,37 +182,38 @@ container_name = my_container.name
    <control> <fromnode>n6</fromnode> <tonode>End</tonode> </control>
    <control> <fromnode>n7</fromnode> <tonode>End</tonode> </control>
    <control> <fromnode>n8</fromnode> <tonode>End</tonode> </control>
+   <control> <fromnode>Create_containers</fromnode> <tonode>Begin</tonode> </control>
    <datalink control="false">
       <fromnode>Begin</fromnode> <fromport>t0</fromport>
       <tonode>End</tonode> <toport>t0</toport>
    </datalink>
    <datalink control="false">
       <fromnode>Begin</fromnode> <fromport>time_to_sleep</fromport>
-      <tonode>n1</tonode> <toport>time_to_sleep</toport>
+      <tonode>End</tonode> <toport>time_to_sleep</toport>
    </datalink>
    <datalink control="false">
       <fromnode>Begin</fromnode> <fromport>time_to_sleep</fromport>
-      <tonode>n2</tonode> <toport>time_to_sleep</toport>
+      <tonode>n7</tonode> <toport>time_to_sleep</toport>
    </datalink>
    <datalink control="false">
       <fromnode>Begin</fromnode> <fromport>time_to_sleep</fromport>
-      <tonode>End</tonode> <toport>time_to_sleep</toport>
+      <tonode>n4</tonode> <toport>time_to_sleep</toport>
    </datalink>
    <datalink control="false">
       <fromnode>Begin</fromnode> <fromport>time_to_sleep</fromport>
-      <tonode>n5</tonode> <toport>time_to_sleep</toport>
+      <tonode>n6</tonode> <toport>time_to_sleep</toport>
    </datalink>
    <datalink control="false">
       <fromnode>Begin</fromnode> <fromport>time_to_sleep</fromport>
-      <tonode>n4</tonode> <toport>time_to_sleep</toport>
+      <tonode>n5</tonode> <toport>time_to_sleep</toport>
    </datalink>
    <datalink control="false">
       <fromnode>Begin</fromnode> <fromport>time_to_sleep</fromport>
-      <tonode>n3</tonode> <toport>time_to_sleep</toport>
+      <tonode>n1</tonode> <toport>time_to_sleep</toport>
    </datalink>
    <datalink control="false">
       <fromnode>Begin</fromnode> <fromport>time_to_sleep</fromport>
-      <tonode>n6</tonode> <toport>time_to_sleep</toport>
+      <tonode>n2</tonode> <toport>time_to_sleep</toport>
    </datalink>
    <datalink control="false">
       <fromnode>Begin</fromnode> <fromport>time_to_sleep</fromport>
@@ -210,7 +221,7 @@ container_name = my_container.name
    </datalink>
    <datalink control="false">
       <fromnode>Begin</fromnode> <fromport>time_to_sleep</fromport>
-      <tonode>n7</tonode> <toport>time_to_sleep</toport>
+      <tonode>n3</tonode> <toport>time_to_sleep</toport>
    </datalink>
    <datalink control="false">
       <fromnode>n1</fromnode> <fromport>container_name</fromport>
@@ -244,15 +255,38 @@ container_name = my_container.name
       <fromnode>n8</fromnode> <fromport>container_name</fromport>
       <tonode>End</tonode> <toport>n8</toport>
    </datalink>
-   <presentation name="n1" x="199" y="106.806" width="158" height="63" expanded="1" expx="199" expy="106.806" expWidth="158" expHeight="63" shownState="0"/>
-   <presentation name="n7" x="197.548" y="488.857" width="158" height="63" expanded="1" expx="197.548" expy="488.857" expWidth="158" expHeight="63" shownState="0"/>
-   <presentation name="End" x="410.5" y="32" width="158" height="306" expanded="1" expx="410.5" expy="32" expWidth="158" expHeight="306" shownState="0"/>
-   <presentation name="Begin" x="4" y="32" width="158" height="90" expanded="1" expx="4" expy="32" expWidth="158" expHeight="90" shownState="0"/>
-   <presentation name="n2" x="197.65" y="170.306" width="158" height="63" expanded="1" expx="197.65" expy="170.306" expWidth="158" expHeight="63" shownState="0"/>
-   <presentation name="n4" x="199.05" y="297.306" width="158" height="63" expanded="1" expx="199.05" expy="297.306" expWidth="158" expHeight="63" shownState="0"/>
-   <presentation name="n3" x="196.65" y="233.806" width="158" height="63" expanded="1" expx="196.65" expy="233.806" expWidth="158" expHeight="63" shownState="0"/>
-   <presentation name="n6" x="197.499" y="424.306" width="158" height="63" expanded="1" expx="197.499" expy="424.306" expWidth="158" expHeight="63" shownState="0"/>
-   <presentation name="n8" x="197.898" y="552.357" width="158" height="63" expanded="1" expx="197.898" expy="552.357" expWidth="158" expHeight="63" shownState="0"/>
-   <presentation name="n5" x="196.749" y="360.806" width="158" height="63" expanded="1" expx="196.749" expy="360.806" expWidth="158" expHeight="63" shownState="0"/>
-   <presentation name="__ROOT__" x="0" y="0" width="572.5" height="619.357" expanded="1" expx="0" expy="0" expWidth="572.5" expHeight="619.357" shownState="0"/>
+   <datalink control="false">
+      <fromnode>Create_containers</fromnode> <fromport>evalSamples</fromport>
+      <tonode>Create_containers.wait_container</tonode> <toport>x</toport>
+   </datalink>
+   <parameter>
+      <tonode>Create_containers</tonode><toport>nbBranches</toport>
+      <value><int>8</int></value>
+   </parameter>
+   <parameter>
+      <tonode>Create_containers</tonode><toport>SmplsCollection</toport>
+      <value><array><data>
+<value><int>1</int></value>
+<value><int>2</int></value>
+<value><int>3</int></value>
+<value><int>4</int></value>
+<value><int>5</int></value>
+<value><int>6</int></value>
+<value><int>7</int></value>
+<value><int>8</int></value>
+</data></array></value>
+   </parameter>
+   <presentation name="Create_containers" x="4" y="71" width="167" height="166" expanded="1" expx="4" expy="71" expWidth="167" expHeight="166" shownState="0"/>
+   <presentation name="n1" x="411" y="62.806" width="158" height="63" expanded="1" expx="411" expy="62.806" expWidth="158" expHeight="63" shownState="0"/>
+   <presentation name="Begin" x="206" y="71.5" width="158" height="90" expanded="1" expx="206" expy="71.5" expWidth="158" expHeight="90" shownState="0"/>
+   <presentation name="Create_containers.wait_container" x="5" y="99" width="158" height="63" expanded="1" expx="5" expy="99" expWidth="158" expHeight="63" shownState="0"/>
+   <presentation name="n7" x="420.548" y="443.806" width="158" height="63" expanded="1" expx="420.548" expy="443.806" expWidth="158" expHeight="63" shownState="0"/>
+   <presentation name="n4" x="415.5" y="253.306" width="158" height="63" expanded="1" expx="415.5" expy="253.306" expWidth="158" expHeight="63" shownState="0"/>
+   <presentation name="n2" x="414.65" y="126.306" width="158" height="63" expanded="1" expx="414.65" expy="126.306" expWidth="158" expHeight="63" shownState="0"/>
+   <presentation name="n8" x="421.898" y="508.306" width="158" height="63" expanded="1" expx="421.898" expy="508.306" expWidth="158" expHeight="63" shownState="0"/>
+   <presentation name="End" x="747" y="45" width="158" height="306" expanded="1" expx="747" expy="45" expWidth="158" expHeight="306" shownState="0"/>
+   <presentation name="n3" x="417.5" y="189.806" width="158" height="63" expanded="1" expx="417.5" expy="189.806" expWidth="158" expHeight="63" shownState="0"/>
+   <presentation name="n5" x="416.5" y="316.806" width="158" height="63" expanded="1" expx="416.5" expy="316.806" expWidth="158" expHeight="63" shownState="0"/>
+   <presentation name="n6" x="417.499" y="380.306" width="158" height="63" expanded="1" expx="417.499" expy="380.306" expWidth="158" expHeight="63" shownState="0"/>
+   <presentation name="__ROOT__" x="0" y="0" width="909" height="575.306" expanded="1" expx="0" expy="0" expWidth="909" expHeight="575.306" shownState="0"/>
 </proc>
index 35f363fda98a62b092de062b6616cd12bfab33ad..0479c522f4e65c5afec6fab3d62875798e8549cb 100755 (executable)
@@ -1528,7 +1528,7 @@ dd=range(10)""")
     n1.edAddChild(n10)
     n10.setScript("""
 import time
-time.sleep(4)
+time.sleep(9)
 o2=2*i1
 """)
     i1=n10.edAddInputPort("i1",ti)
@@ -1559,7 +1559,7 @@ o2=2*i1
     myRun=threading.Thread(None, ex.RunW, None, (p,0))
     myRun.start()
     import time
-    time.sleep(7)
+    time.sleep(15)
     SALOMERuntime.schemaSaveState(p, ex, xmlStateFileName)
     a,b,c=n1.getPassedResults(ex)
     myRun.join()
index 5c5fe5e672f6f9f006c9814b2467ab310bc19f85..965283530d3c5180d690df423ed06e4134bf1ecc 100755 (executable)
@@ -27,7 +27,7 @@ import tempfile
 import os
 import salome
 
-NB_NODE=16
+NB_NODE=15
 class TestEdit(unittest.TestCase):
 
     def setUp(self):
@@ -71,7 +71,7 @@ class TestEdit(unittest.TestCase):
         # The containers may need some time to be launched.
         # We need some delay to add to the 15s.
         msg = "Execution time is too long : {}s".format(execution_time)
-        self.assertTrue(execution_time < 25, msg)
+        self.assertTrue(execution_time < 20, msg)
 
     def test2(self):
         """ Two parallel foreach-s with different containers and python nodes
@@ -91,7 +91,7 @@ class TestEdit(unittest.TestCase):
         # The containers may need some time to be launched.
         # We need some delay to add to the 16s.
         msg = "Execution time is too long : {}s".format(execution_time)
-        self.assertTrue(execution_time < 26, msg)
+        self.assertTrue(execution_time < 20, msg)
         coeff_cont = proc.getChildByName("End").getOutputPort("coeff_cont").getPyObj()
         msg = "coeff_cont too low:"+str(coeff_cont)
         self.assertTrue(coeff_cont >= NB_NODE, msg)