diff options
author | Jose <jose@zeroc.com> | 2018-08-06 11:56:42 +0200 |
---|---|---|
committer | Jose <jose@zeroc.com> | 2018-08-06 11:56:42 +0200 |
commit | 7972f07a3aa244dcde673b7cb5541e70da9193bb (patch) | |
tree | 117faced1bb36ac256c7d362e11ac1c49e8e8c88 /python/test/Ice/servantLocator/ServerAMD.py | |
parent | Update JavaScript tests to use TestHelper class (diff) | |
download | ice-7972f07a3aa244dcde673b7cb5541e70da9193bb.tar.bz2 ice-7972f07a3aa244dcde673b7cb5541e70da9193bb.tar.xz ice-7972f07a3aa244dcde673b7cb5541e70da9193bb.zip |
Python test suite updates
Diffstat (limited to 'python/test/Ice/servantLocator/ServerAMD.py')
-rwxr-xr-x | python/test/Ice/servantLocator/ServerAMD.py | 35 |
1 files changed, 17 insertions, 18 deletions
diff --git a/python/test/Ice/servantLocator/ServerAMD.py b/python/test/Ice/servantLocator/ServerAMD.py index d7e24ae2816..a8879fafd0a 100755 --- a/python/test/Ice/servantLocator/ServerAMD.py +++ b/python/test/Ice/servantLocator/ServerAMD.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, TestAMDI, TestActivationAMDI +import TestAMDI +import TestActivationAMDI -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(TestAMDI.ServantLocatorI("category"), "category") - adapter.addServantLocator(TestAMDI.ServantLocatorI(""), "") - adapter.add(TestAMDI.TestI(), Ice.stringToIdentity("asm")) - adapter.add(TestActivationAMDI.TestActivationAMDI(), Ice.stringToIdentity("test/activation")) +class ServerAMD(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(TestAMDI.ServantLocatorI("category"), "category") + adapter.addServantLocator(TestAMDI.ServantLocatorI(""), "") + adapter.add(TestAMDI.TestI(), Ice.stringToIdentity("asm")) + adapter.add(TestActivationAMDI.TestActivationAMDI(), Ice.stringToIdentity("test/activation")) -app = TestServer() -sys.exit(app.main(sys.argv)) + adapter.activate() + adapter.waitForDeactivate() |