]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
[EDF30875] : Fix for test08 mem/mem
authorAnthony Geay <anthony.geay@edf.fr>
Tue, 10 Sep 2024 21:23:12 +0000 (23:23 +0200)
committerAnthony Geay <anthony.geay@edf.fr>
Tue, 10 Sep 2024 21:23:12 +0000 (23:23 +0200)
src/Container/SALOME_PyNode.py

index 4a1c2e0d7e5e1674fa0da68e031c2789e966b6b6..65eaec8438fe1d3978ef75e0a373664662c8e1d8 100644 (file)
@@ -860,22 +860,22 @@ from SALOME_PyNode import LogOfCurrentExecutionSession,MY_PERFORMANCE_LOG_ENTRY_
 from SALOME_PyNode import ExchangeModeServerSideFactory
 from KernelBasis import VerbosityActivated,SetVerbosityLevel,SetVerbosityActivated
 from salome_utils import positionVerbosityOfLoggerRegardingState
-import CORBA
 import Engines
+import salome
 import os
+salome.salome_init()
 from datetime import datetime
 SetVerbosityActivated( {} )
 SetVerbosityLevel( "{}" )
 positionVerbosityOfLoggerRegardingState()
 # WorkDir may be important to replay : "{}"
-orb = CORBA.ORB_init([''])
+orb = salome.orb
 caseDirectory = "{}"
 contextExchangeMode = "{}"
 bigObjExchanger = ExchangeModeServerSideFactory( contextExchangeMode )
 codeFileName = os.path.join( caseDirectory, "{}" )
 inputFileName = "{}"
 outputFileName = "{}"
-del os
 outputsKeys = {}
 exec( "{{}} = LogOfCurrentExecutionSession( orb.string_to_object( \\"{}\\" ) )".format(MY_PERFORMANCE_LOG_ENTRY_IN_GLBS) )
 if VerbosityActivated():
@@ -1017,6 +1017,7 @@ class ExchangeContextUsingTCP( ExchangeContextBridgeAbs ):
     pman.activate()
     obj = SenderByte_i(poa, pickle.dumps( context) ) ; id_o = poa.activate_object(obj) ; refPtr = poa.id_to_reference(id_o)
     self._data_exchange_channel.pushOutputContext( refPtr )
+    pman.deactivate(True,True)
 
 def ExchangeModeServerSideFactory( exchangeMode ):
   if exchangeMode == "File":
@@ -1125,7 +1126,6 @@ def ExecCrashProofGeneric( code, context, outargsname, containerRef, instanceOfL
   import tempfile
   import pickle
   import subprocess as sp
-  import CORBA
   import logging
   #
   def IsConsideredAsOKRun( returnCode, closeEyesOnErrorAtExit , stderr ):
@@ -1146,7 +1146,9 @@ def ExecCrashProofGeneric( code, context, outargsname, containerRef, instanceOfL
   #
   def InternalExecResistant( exchangeMode, code, context, outargsname):
     import KernelBasis
-    orb = CORBA.ORB_init([''])
+    import salome
+    salome.salome_init()
+    orb = salome.orb
     iorScriptLog = orb.object_to_string( instanceOfLogOfCurrentSession._remote_handle )#ref ContainerScriptPerfLog_ptr
     ####
     EXEC_CODE_FNAME_PXF = "execsafe_"