summaryrefslogtreecommitdiff
path: root/python/test/Ice/servantLocator/Server.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/Server.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/Server.py')
-rwxr-xr-xpython/test/Ice/servantLocator/Server.py35
1 files changed, 17 insertions, 18 deletions
diff --git a/python/test/Ice/servantLocator/Server.py b/python/test/Ice/servantLocator/Server.py
index bba67c364e2..6df66582edc 100755
--- a/python/test/Ice/servantLocator/Server.py
+++ b/python/test/Ice/servantLocator/Server.py
@@ -8,26 +8,25 @@
#
# **********************************************************************
-import os, sys, traceback, time
-
+from TestHelper import TestHelper
+TestHelper.loadSlice('Test.ice')
import Ice
-Ice.loadSlice('Test.ice')
-import Test, TestI, TestActivationI
+import TestI
+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.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 Server(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")
- adapter.activate()
- adapter.waitForDeactivate()
- return 0
+ adapter = communicator.createObjectAdapter("TestAdapter")
+ 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"))
-app = TestServer()
-sys.exit(app.main(sys.argv))
+ adapter.activate()
+ adapter.waitForDeactivate()