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/binding/Server.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/binding/Server.py')
-rwxr-xr-x | python/test/Ice/binding/Server.py | 32 |
1 files changed, 13 insertions, 19 deletions
diff --git a/python/test/Ice/binding/Server.py b/python/test/Ice/binding/Server.py index a7f24ce1642..c720f9919ac 100755 --- a/python/test/Ice/binding/Server.py +++ b/python/test/Ice/binding/Server.py @@ -8,27 +8,21 @@ # # ********************************************************************** -import os, sys, traceback - import Ice -Ice.loadSlice('Test.ice') -import Test, TestI +from TestHelper import TestHelper +TestHelper.loadSlice("Test.ice") +import TestI + + +class Server(TestHelper): -def run(args, communicator): - communicator.getProperties().setProperty("TestAdapter.Endpoints", "default -p 12010") - adapter = communicator.createObjectAdapter("TestAdapter") - id = Ice.stringToIdentity("communicator") - adapter.add(TestI.RemoteCommunicatorI(), id) - adapter.activate() + def run(self, args): - communicator.waitForShutdown() - return True + with self.initialize(args) as communicator: -try: - with Ice.initialize(sys.argv) as communicator: - status = run(sys.argv, communicator) -except: - traceback.print_exc() - status = False + communicator.getProperties().setProperty("TestAdapter.Endpoints", self.getTestEndpoint()) + adapter = communicator.createObjectAdapter("TestAdapter") + adapter.add(TestI.RemoteCommunicatorI(), Ice.stringToIdentity("communicator")) + adapter.activate() -sys.exit(not status) + communicator.waitForShutdown() |