ICE 3.4.2
[php5-ice-freebsdport.git] / py / test / Ice / adapterDeactivation / Collocated.py
blob88addb84cec2f63fdf4f64f8a2eb3062a94d78e0
1 #!/usr/bin/env python
2 # **********************************************************************
4 # Copyright (c) 2003-2011 ZeroC, Inc. All rights reserved.
6 # This copy of Ice is licensed to you under the terms described in the
7 # ICE_LICENSE file included in this distribution.
9 # **********************************************************************
11 import os, sys, traceback, time
13 import Ice
14 Ice.loadSlice('Test.ice')
15 import Test, TestI, AllTests
17 class TestServer(Ice.Application):
18 def run(self, args):
19 self.communicator().getProperties().setProperty("TestAdapter.Endpoints", "default -p 12010")
20 adapter = self.communicator().createObjectAdapter("TestAdapter")
21 locator = TestI.ServantLocatorI()
23 adapter.addServantLocator(locator, "")
24 adapter.activate()
26 AllTests.allTests(self.communicator())
28 adapter.waitForDeactivate()
29 return 0
31 app = TestServer()
32 sys.exit(app.main(sys.argv))