KernelBasis.HeatMarcel(5 * nbcore * cst,nbcore)
j = 8*i"""
+killMeAtTheEnd = """import atexit
+import KernelServices
+
+def ErrorAtexit():
+ KernelServices.GenerateViolentMemoryFaultForTestPurpose()
+
+atexit.register(ErrorAtexit)
+
+print("OKKKKKK")
+j = 9 * i
+print("OKKKKKK3333")
+"""
+
class testPerfLogManager1(unittest.TestCase):
def test0(self):
"""
self.assertGreater(len(greater_than_100),1) # At minimum one measure must report CPU load > 100%
cont.Shutdown()
+ def test3(self):
+ """
+ [EDF29150] : test that we can resist to a crash at exit
+ """
+ salome.salome_init()
+ KernelBasis.SetPyExecutionMode("OutOfProcessWithReplay")
+ hostname = "localhost"
+ cp = pylauncher.GetRequestForGiveContainer(hostname,"container_crash_test")
+ salome.cm.SetBigObjOnDiskThreshold(1000)
+ salome.cm.SetOverrideEnvForContainersSimple(env = [])
+ cont = salome.cm.GiveContainer(cp)
+ poa = salome.orb.resolve_initial_references("RootPOA")
+ obj = SALOME_PyNode.SenderByte_i(poa,pickle.dumps( (["i"],{"i": 3} ) )) ; id_o = poa.activate_object(obj) ; refPtr = poa.id_to_reference(id_o)
+ pyscript = cont.createPyScriptNode("testScript4",killMeAtTheEnd)
+ pyscript.executeFirst(refPtr)
+ ret = pyscript.executeSecond(["j"])
+ ret = pickle.loads( SALOME_PyNode.SeqByteReceiver(ret[0]).data() )
+ self.assertEqual(ret,27)
+ cont.Shutdown()
+
if __name__ == '__main__':
from salome_utils import positionVerbosityOfLoggerRegardingState,setVerboseLevel,setVerbose
salome.standalone()