[omniORB] Running Tests
Antonio Beamud Montero
antonio.beamud at gmail.com
Thu Nov 6 13:20:22 GMT 2008
Hi all:
I've a problem trying to test my corba app. If I run each test isolated,
all works fine, but trying to run the suite, the second test fails. For
example:
class CorbaTest(unittest.TestCase):
def test_simple1(self):
sys.argv += ['-ORBendPoint', ':unix:/tmp/corba.sock']
orb = CORBA.ORB_init(sys.argv, CORBA.ORB_ID)
inspoa = orb.resolve_initial_references("omniINSPOA")
servant = Echo_i()
inspoa.activate_object_with_id('echo_1', servant)
inspoa._get_the_POAManager().activate()
assert os.path.exists('/tmp/corba.sock')
def test_simple2(self):
sys.argv += ['-ORBendPoint', ':unix:/tmp/corba2.sock']
orb = CORBA.ORB_init(sys.argv, CORBA.ORB_ID)
inspoa = orb.resolve_initial_references("omniINSPOA")
servant = Echo_i()
inspoa.activate_object_with_id('echo_2', servant)
inspoa._get_the_POAManager().activate()
assert os.path.exists('/tmp/corba2.sock')
Running this test suite, the second socket ('/tmp/corba2.sock'), isn't
created. If I run only this test, all works fine.
I've tried to reinit the Omniorb environment, but without success.
How can I reset the environment for each test?
Thanks.
More information about the omniORB-list
mailing list