summaryrefslogtreecommitdiff
path: root/python/test/Ice/servantLocator/Collocated.py
diff options
context:
space:
mode:
authorJose <jose@zeroc.com>2018-08-06 11:56:42 +0200
committerJose <jose@zeroc.com>2018-08-06 11:56:42 +0200
commit7972f07a3aa244dcde673b7cb5541e70da9193bb (patch)
tree117faced1bb36ac256c7d362e11ac1c49e8e8c88 /python/test/Ice/servantLocator/Collocated.py
parentUpdate JavaScript tests to use TestHelper class (diff)
downloadice-7972f07a3aa244dcde673b7cb5541e70da9193bb.tar.bz2
ice-7972f07a3aa244dcde673b7cb5541e70da9193bb.tar.xz
ice-7972f07a3aa244dcde673b7cb5541e70da9193bb.zip
Python test suite updates
Diffstat (limited to 'python/test/Ice/servantLocator/Collocated.py')
-rwxr-xr-xpython/test/Ice/servantLocator/Collocated.py40
1 files changed, 20 insertions, 20 deletions
diff --git a/python/test/Ice/servantLocator/Collocated.py b/python/test/Ice/servantLocator/Collocated.py
index 77d3dc12967..061b032435d 100755
--- a/python/test/Ice/servantLocator/Collocated.py
+++ b/python/test/Ice/servantLocator/Collocated.py
@@ -8,29 +8,29 @@
#
# **********************************************************************
-import os, sys, traceback, time
-
+from TestHelper import TestHelper
+TestHelper.loadSlice('Test.ice')
import Ice
-Ice.loadSlice('Test.ice')
-import Test, TestI, AllTests, TestActivationI
+import TestI
+import AllTests
+import TestActivationI
-class TestServer(Ice.Application):
- def run(self, args):
- self.communicator().getProperties().setProperty("TestAdapter.Endpoints", "default -p 12010")
- self.communicator().getProperties().setProperty("Ice.Warn.Dispatch", "0")
- adapter = self.communicator().createObjectAdapter("TestAdapter")
- #adapter.activate() // Don't activate OA to ensure collocation is used.
- adapter.addServantLocator(TestI.ServantLocatorI("category"), "category")
- adapter.addServantLocator(TestI.ServantLocatorI(""), "")
- adapter.add(TestI.TestI(), Ice.stringToIdentity("asm"))
- adapter.add(TestActivationI.TestActivationI(), Ice.stringToIdentity("test/activation"))
+class Collocated(TestHelper):
+
+ def run(self, args):
+ with self.initialize(args=args) as communicator:
+ communicator.getProperties().setProperty("TestAdapter.Endpoints", self.getTestEndpoint())
+ communicator.getProperties().setProperty("Ice.Warn.Dispatch", "0")
- AllTests.allTests(self.communicator(), False)
+ adapter = communicator.createObjectAdapter("TestAdapter")
+ # adapter.activate() // Don't activate OA to ensure collocation is used.
+ adapter.addServantLocator(TestI.ServantLocatorI("category"), "category")
+ adapter.addServantLocator(TestI.ServantLocatorI(""), "")
+ adapter.add(TestI.TestI(), Ice.stringToIdentity("asm"))
+ adapter.add(TestActivationI.TestActivationI(), Ice.stringToIdentity("test/activation"))
- adapter.deactivate()
- adapter.waitForDeactivate()
- return 0
+ AllTests.allTests(self, communicator)
-app = TestServer()
-sys.exit(app.main(sys.argv))
+ adapter.deactivate()
+ adapter.waitForDeactivate()