示例#1
0
    def run(self, args):

        properties = self.createTestProperties(args)
        properties.setProperty("Ice.Warn.AMICallback", "0")
        #
        # This test kills connections, so we don't want warnings.
        #
        properties.setProperty("Ice.Warn.Connections", "0")

        with self.initialize(properties=properties) as communicator:

            communicator.getProperties().setProperty("TestAdapter.Endpoints",
                                                     self.getTestEndpoint())
            communicator.getProperties().setProperty(
                "ControllerAdapter.Endpoints", self.getTestEndpoint(num=1))
            communicator.getProperties().setProperty(
                "ControllerAdapter.ThreadPool.Size", "1")

            adapter = communicator.createObjectAdapter("TestAdapter")
            adapter2 = communicator.createObjectAdapter("ControllerAdapter")

            testController = TestI.TestIntfControllerI(adapter)

            adapter.add(TestI.TestIntfI(), Ice.stringToIdentity("test"))
            adapter.add(TestI.TestIntfII(), Ice.stringToIdentity("test2"))
            # adapter.activate() # Collocated test doesn't need to active the OA

            adapter2.add(testController,
                         Ice.stringToIdentity("testController"))
            # adapter2.activate() # Collocated test doesn't need to active the OA

            AllTests.allTests(self, communicator, True)
示例#2
0
文件: Client.py 项目: zk2013/ice
 def run(self, args):
     properties = self.createTestProperties(args)
     properties.setProperty(
         "Ice.Default.Locator",
         "locator:{0}".format(self.getTestEndpoint(properties=properties)))
     with self.initialize(properties=properties) as communicator:
         AllTests.allTests(self, communicator)
示例#3
0
    def run(self, args):
        #
        # In this test, we need at least two threads in the
        # client side thread pool for nested AMI.
        #
        properties = self.createTestProperties(args)

        #
        # For this test, we want to disable retries.
        #
        properties.setProperty("Ice.RetryIntervals", "-1")

        #
        # This test kills connections, so we don't want warnings.
        #
        properties.setProperty("Ice.Warn.Connections", "0")

        #
        # Limit the send buffer size, this test relies on the socket
        # send() blocking after sending a given amount of data.
        #
        properties.setProperty("Ice.TCP.SndSize", "50000")

        with self.initialize(properties=properties) as communicator:
            AllTests.allTests(self, communicator)
 def run(self, args):
     with self.initialize(args=args) as communicator:
         communicator.getProperties().setProperty("TestAdapter.Endpoints", self.getTestEndpoint())
         adapter = communicator.createObjectAdapter("TestAdapter")
         adapter.add(TestI.InitialI(adapter), Ice.stringToIdentity("initial"))
         # adapter.activate() // Don't activate OA to ensure collocation is used.
         AllTests.allTests(self, communicator)
示例#5
0
文件: Client.py 项目: chuanqingli/ice
    def run(self, args):
        #
        # In this test, we need at least two threads in the
        # client side thread pool for nested AMI.
        #
        properties = self.createTestProperties(args)

        #
        # For this test, we want to disable retries.
        #
        properties.setProperty("Ice.RetryIntervals", "-1")

        #
        # This test kills connections, so we don't want warnings.
        #
        properties.setProperty("Ice.Warn.Connections", "0")

        #
        # Limit the send buffer size, this test relies on the socket
        # send() blocking after sending a given amount of data.
        #
        properties.setProperty("Ice.TCP.SndSize", "50000")

        with self.initialize(properties=properties) as communicator:
            AllTests.allTests(self, communicator)
示例#6
0
 def run(self, args):
     with self.initialize(args=args) as communicator:
         communicator.getProperties().setProperty("TestAdapter.Endpoints",
                                                  self.getTestEndpoint())
         adapter = communicator.createObjectAdapter("TestAdapter")
         adapter.add(TestI.InitialI(adapter),
                     Ice.stringToIdentity("initial"))
         # adapter.activate() // Don't activate OA to ensure collocation is used.
         AllTests.allTests(self, communicator)
示例#7
0
def run(args, communicator):
    communicator.getProperties().setProperty("TestAdapter.Endpoints", "default -p 12010")
    adapter = communicator.createObjectAdapter("TestAdapter")
    adapter.add(TestI.MyDerivedClassI(), communicator.stringToIdentity("test"))
    #adapter.activate() // Don't activate OA to ensure collocation is used.

    AllTests.allTests(communicator, True)

    return True
示例#8
0
def run(args, communicator):
    communicator.getProperties().setProperty("TestAdapter.Endpoints", "default -p 12010")
    adapter = communicator.createObjectAdapter("TestAdapter")
    adapter.add(TestI.MyDerivedClassI(), communicator.stringToIdentity("test"))
    adapter.activate()

    AllTests.allTests(communicator, True)

    return True
示例#9
0
def run(args, communicator):
    communicator.getProperties().setProperty("TestAdapter.Endpoints", "default -p 12010")
    adapter = communicator.createObjectAdapter("TestAdapter")
    adapter.add(TestI.MyDerivedClassI(), Ice.stringToIdentity("test"))
    #adapter.activate() // Don't activate OA to ensure collocation is used.

    AllTests.allTests(communicator, True)

    return True
示例#10
0
def run(args, communicator):
    communicator.getProperties().setProperty("TestAdapter.Endpoints", "default -p 12010")
    adapter = communicator.createObjectAdapter("TestAdapter")
    object = TestI.InitialI(adapter)
    adapter.add(object, Ice.stringToIdentity("initial"))
    #adapter.activate() // Don't activate OA to ensure collocation is used.

    AllTests.allTests(communicator)

    return True
示例#11
0
def run(args, communicator):
    communicator.getProperties().setProperty("TestAdapter.Endpoints", "default -p 12010")
    adapter = communicator.createObjectAdapter("TestAdapter")
    object = TestI.InitialI(adapter)
    adapter.add(object, communicator.stringToIdentity("initial"))
    #adapter.activate() // Don't activate OA to ensure collocation is used.

    AllTests.allTests(communicator)

    return True
示例#12
0
    def run(self, args):
        properties = self.createTestProperties(args)
        properties.setProperty('Ice.ThreadPool.Client.Size', '2')
        properties.setProperty('Ice.ThreadPool.Client.SizeWarn', '0')
        properties.setProperty("Ice.BatchAutoFlushSize", "100")

        with self.initialize(properties=properties) as communicator:
            AllTests.allTests(self, communicator)
            # Test multiple destroy calls
            communicator.destroy()
            communicator.destroy()
示例#13
0
文件: Collocated.py 项目: zk2013/ice
 def run(self, args):
     properties = self.createTestProperties(args)
     properties.setProperty("Ice.BatchAutoFlushSize", "100")
     with self.initialize(properties=properties) as communicator:
         communicator.getProperties().setProperty("TestAdapter.Endpoints", self.getTestEndpoint())
         adapter = communicator.createObjectAdapter("TestAdapter")
         prx = adapter.add(TestI.MyDerivedClassI(), Ice.stringToIdentity("test"))
         # adapter.activate() // Don't activate OA to ensure collocation is used.
         if prx.ice_getConnection():
             raise RuntimeError("collocation doesn't work")
         AllTests.allTests(self, communicator)
示例#14
0
    def run(self, args):
        properties = self.createTestProperties(args)
        properties.setProperty('Ice.ThreadPool.Client.Size', '2')
        properties.setProperty('Ice.ThreadPool.Client.SizeWarn', '0')
        properties.setProperty("Ice.BatchAutoFlushSize", "100")

        with self.initialize(properties=properties) as communicator:
            AllTests.allTests(self, communicator)
            # Test multiple destroy calls
            communicator.destroy()
            communicator.destroy()
示例#15
0
    def run(self, args):
        properties = self.createTestProperties(args)
        properties.setProperty("Ice.MessageSizeMax", "10")

        with self.initialize(properties=properties) as communicator:
            communicator.getProperties().setProperty("Ice.Warn.Dispatch", "0")
            communicator.getProperties().setProperty("TestAdapter.Endpoints", self.getTestEndpoint())
            adapter = communicator.createObjectAdapter("TestAdapter")
            adapter.add(TestI.ThrowerI(), Ice.stringToIdentity("thrower"))
            # adapter.activate() // Don't activate OA to ensure collocation is used.
            AllTests.allTests(self, communicator)
示例#16
0
def run(args, communicator):
    communicator.getProperties().setProperty("TestAdapter.Endpoints",
                                             "default -p 12010")
    adapter = communicator.createObjectAdapter("TestAdapter")
    object = TestI.InitialI(adapter)
    adapter.add(object, communicator.stringToIdentity("initial"))
    adapter.activate()

    AllTests.allTests(communicator)

    return True
    def run(self, args):
        properties = self.createTestProperties(args)
        properties.setProperty("Ice.MessageSizeMax", "10")

        with self.initialize(properties=properties) as communicator:
            communicator.getProperties().setProperty("Ice.Warn.Dispatch", "0")
            communicator.getProperties().setProperty("TestAdapter.Endpoints", self.getTestEndpoint())
            adapter = communicator.createObjectAdapter("TestAdapter")
            adapter.add(TestI.ThrowerI(), Ice.stringToIdentity("thrower"))
            # adapter.activate() // Don't activate OA to ensure collocation is used.
            AllTests.allTests(self, communicator)
示例#18
0
    def run(self, args):
        self.communicator().getProperties().setProperty("TestAdapter.Endpoints", "default -p 12010")
        adapter = self.communicator().createObjectAdapter("TestAdapter")
        locator = TestI.ServantLocatorI()

        adapter.addServantLocator(locator, "")
        adapter.activate()

        AllTests.allTests(self.communicator())

        adapter.waitForDeactivate()
        return 0
示例#19
0
文件: Collocated.py 项目: sk163/ice-1
    def run(self, args):
        self.communicator().getProperties().setProperty("TestAdapter.Endpoints", "default -p 12010")
        adapter = self.communicator().createObjectAdapter("TestAdapter")
        locator = TestI.ServantLocatorI()

        adapter.addServantLocator(locator, "")
        #adapter.activate() // Don't activate OA to ensure collocation is used.

        AllTests.allTests(self.communicator())

        adapter.waitForDeactivate()
        return 0
示例#20
0
文件: Collocated.py 项目: zk2013/ice
 def run(self, args):
     properties = self.createTestProperties(args)
     properties.setProperty("Ice.Warn.Dispatch", "0")
     with self.initialize(properties=properties) as communicator:
         communicator.getProperties().setProperty("TestAdapter.Endpoints", self.getTestEndpoint())
         adapter = communicator.createObjectAdapter("TestAdapter")
         initial = TestI.InitialI(adapter)
         adapter.add(initial, Ice.stringToIdentity("initial"))
         adapter.add(TestI.UnexpectedObjectExceptionTestI(), Ice.stringToIdentity("uoet"))
         # adapter.activate() // Don't activate OA to ensure collocation is used.
         AllTests.allTests(self, communicator)
         # We must call shutdown even in the collocated case for cyclic dependency cleanup
         initial.shutdown()
    def run(self, args):

        with self.initialize(args=args) as communicator:
            communicator.getProperties().setProperty("TestAdapter.Endpoints", self.getTestEndpoint())
            adapter = communicator.createObjectAdapter("TestAdapter")
            locator = TestI.ServantLocatorI()

            adapter.addServantLocator(locator, "")
            # adapter.activate() // Don't activate OA to ensure collocation is used.

            AllTests.allTests(self, communicator)

            adapter.waitForDeactivate()
示例#22
0
文件: Client.py 项目: zj771484545/ice
    def run(self, args):
        properties = self.createTestProperties(args)
        properties.setProperty('Ice.Warn.AMICallback', '0')
        properties.setProperty('Ice.Warn.Connections', '0')

        #
        # Limit the send buffer size, this test relies on the socket
        # send() blocking after sending a given amount of data.
        #
        properties.setProperty("Ice.TCP.SndSize", "50000")

        with self.initialize(properties=properties) as communicator:
            AllTests.allTests(self, communicator, False)
            AllTests.allTestsFuture(self, communicator, False)
示例#23
0
    def run(self, args):

        with self.initialize(args=args) as communicator:
            communicator.getProperties().setProperty("TestAdapter.Endpoints",
                                                     self.getTestEndpoint())
            adapter = communicator.createObjectAdapter("TestAdapter")
            locator = TestI.ServantLocatorI()

            adapter.addServantLocator(locator, "")
            # adapter.activate() // Don't activate OA to ensure collocation is used.

            AllTests.allTests(self, communicator)

            adapter.waitForDeactivate()
示例#24
0
    def run(self, args):
        properties = self.createTestProperties(args)
        properties.setProperty('Ice.Warn.AMICallback', '0')
        properties.setProperty('Ice.Warn.Connections', '0')

        #
        # Limit the send buffer size, this test relies on the socket
        # send() blocking after sending a given amount of data.
        #
        properties.setProperty("Ice.TCP.SndSize", "50000")

        with self.initialize(properties=properties) as communicator:
            AllTests.allTests(self, communicator, False)
            AllTests.allTestsFuture(self, communicator, False)
示例#25
0
def run(args, communicator):
    communicator.getProperties().setProperty("TestAdapter.Endpoints", "default -p 12010")
    adapter = communicator.createObjectAdapter("TestAdapter")
    initial = TestI.InitialI(adapter)
    adapter.add(initial, communicator.stringToIdentity("initial"))
    uoet = TestI.UnexpectedObjectExceptionTestI()
    adapter.add(uoet, communicator.stringToIdentity("uoet"))
    #adapter.activate() // Don't activate OA to ensure collocation is used.

    AllTests.allTests(communicator)

    # We must call shutdown even in the collocated case for cyclic dependency cleanup
    initial.shutdown()

    return True
示例#26
0
文件: Collocated.py 项目: sk163/ice-1
def run(args, communicator):
    communicator.getProperties().setProperty("TestAdapter.Endpoints", "default -p 12010")
    adapter = communicator.createObjectAdapter("TestAdapter")
    initial = TestI.InitialI(adapter)
    adapter.add(initial, communicator.stringToIdentity("initial"))
    uoet = TestI.UnexpectedObjectExceptionTestI()
    adapter.add(uoet, communicator.stringToIdentity("uoet"))
    #adapter.activate() // Don't activate OA to ensure collocation is used.

    AllTests.allTests(communicator)

    # We must call shutdown even in the collocated case for cyclic dependency cleanup
    initial.shutdown()

    return True
示例#27
0
    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()
        adapter.addServantLocator(TestI.ServantLocatorI("category"), "category")
        adapter.addServantLocator(TestI.ServantLocatorI(""), "")
        adapter.add(TestI.TestI(), self.communicator().stringToIdentity("asm"))
        adapter.add(TestActivationI.TestActivationI(), self.communicator().stringToIdentity("test/activation"))

        AllTests.allTests(self.communicator(), False)

        adapter.deactivate()
        adapter.waitForDeactivate()
        return 0
示例#28
0
def run(args, communicator):
    communicator.getProperties().setProperty("TestAdapter.Endpoints", "default -p 12010")
    adapter = communicator.createObjectAdapter("TestAdapter")
    d = TestI.DI()
    adapter.add(d, communicator.stringToIdentity("d"))
    adapter.addFacet(d, communicator.stringToIdentity("d"), "facetABCD")
    f = TestI.FI()
    adapter.addFacet(f, communicator.stringToIdentity("d"), "facetEF")
    h = TestI.HI(communicator)
    adapter.addFacet(h, communicator.stringToIdentity("d"), "facetGH")

    #adapter.activate() // Don't activate OA to ensure collocation is used.

    AllTests.allTests(communicator)

    return True
    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 = 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"))

            AllTests.allTests(self, communicator)

            adapter.deactivate()
            adapter.waitForDeactivate()
示例#30
0
 def run(self, args):
     properties = self.createTestProperties(args)
     properties.setProperty("Ice.MessageSizeMax", "10")
     properties.setProperty("Ice.Warn.Connections", "0")
     with self.initialize(properties=properties) as communicator:
         thrower = AllTests.allTests(self, communicator)
         thrower.shutdown()
示例#31
0
    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 = 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"))

            AllTests.allTests(self, communicator)

            adapter.deactivate()
            adapter.waitForDeactivate()
示例#32
0
    def run(self, args):
        initData = Ice.InitializationData()
        initData.properties = self.createTestProperties(args)

        #
        # Limit the send buffer size, this test relies on the socket
        # send() blocking after sending a given amount of data.
        #
        initData.properties.setProperty("Ice.TCP.SndSize", "50000")
        d = Dispatcher.Dispatcher()
        initData.dispatcher = d.dispatch

        with self.initialize(initData=initData) as communicator:
            AllTests.allTests(self, communicator)

        Dispatcher.Dispatcher.terminate()
示例#33
0
文件: Client.py 项目: chuanqingli/ice
 def run(self, args):
     properties = self.createTestProperties(args)
     properties.setProperty("Ice.MessageSizeMax", "10")
     properties.setProperty("Ice.Warn.Connections", "0")
     with self.initialize(properties=properties) as communicator:
         thrower = AllTests.allTests(self, communicator)
         thrower.shutdown()
示例#34
0
    def run(self, args):
        initData = Ice.InitializationData()
        initData.properties = self.createTestProperties(args)

        #
        # Limit the send buffer size, this test relies on the socket
        # send() blocking after sending a given amount of data.
        #
        initData.properties.setProperty("Ice.TCP.SndSize", "50000")
        d = Dispatcher.Dispatcher()
        initData.dispatcher = d.dispatch

        with self.initialize(initData=initData) as communicator:
            AllTests.allTests(self, communicator)

        Dispatcher.Dispatcher.terminate()
示例#35
0
    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"))

        AllTests.allTests(self.communicator(), False)

        adapter.deactivate()
        adapter.waitForDeactivate()
        return 0
示例#36
0
def run(args, communicator):
    communicator.getProperties().setProperty("TestAdapter.Endpoints", "default -p 12010")
    adapter = communicator.createObjectAdapter("TestAdapter")
    d = TestI.DI()
    adapter.add(d, communicator.stringToIdentity("d"))
    adapter.addFacet(d, communicator.stringToIdentity("d"), "facetABCD")
    f = TestI.FI()
    adapter.addFacet(f, communicator.stringToIdentity("d"), "facetEF")
    h = TestI.HI(communicator)
    adapter.addFacet(h, communicator.stringToIdentity("d"), "facetGH")

    #adapter.activate() // Don't activate OA to ensure collocation is used.

    AllTests.allTests(communicator)

    return True
示例#37
0
def run(args, communicator):
    communicator.getProperties().setProperty("TestAdapter.Endpoints", "default -p 12010")
    communicator.getProperties().setProperty("ControllerAdapter.Endpoints", "default -p 12011")
    communicator.getProperties().setProperty("ControllerAdapter.ThreadPool.Size", "1")

    adapter = communicator.createObjectAdapter("TestAdapter")
    adapter2 = communicator.createObjectAdapter("ControllerAdapter")

    testController = TestI.TestIntfControllerI(adapter)

    adapter.add(TestI.TestIntfI(), communicator.stringToIdentity("test"))
    #adapter.activate() # Collocated test doesn't need to active the OA
    
    adapter2.add(testController, communicator.stringToIdentity("testController"))
    #adapter2.activate() # Collocated test doesn't need to active the OA

    AllTests.allTests(communicator, True)

    return True
示例#38
0
def run(args, communicator):
    communicator.getProperties().setProperty("TestAdapter.Endpoints", "default -p 12010")
    communicator.getProperties().setProperty("ControllerAdapter.Endpoints", "default -p 12011")
    communicator.getProperties().setProperty("ControllerAdapter.ThreadPool.Size", "1")

    adapter = communicator.createObjectAdapter("TestAdapter")
    adapter2 = communicator.createObjectAdapter("ControllerAdapter")

    testController = TestI.TestIntfControllerI(adapter)

    adapter.add(TestI.TestIntfI(), communicator.stringToIdentity("test"))
    #adapter.activate() # Collocated test doesn't need to active the OA
    
    adapter2.add(testController, communicator.stringToIdentity("testController"))
    #adapter2.activate() # Collocated test doesn't need to active the OA

    AllTests.allTests(communicator, True)

    return True
示例#39
0
文件: Client.py 项目: zk2013/ice
    def run(self, args):

        properties = self.createTestProperties(args)

        #
        # This test aborts servers, so we don't want warnings.
        #
        properties.setProperty('Ice.Warn.Connections', '0')

        ports = []
        for arg in args:
            if arg[0] == '-':
                continue
            ports.append(int(arg))

        if len(ports) == 0:
            raise RuntimeError("no ports specified")

        with self.initialize(properties=properties) as communicator:
            AllTests.allTests(self, communicator, ports)
示例#40
0
    def run(self, args):

        properties = self.createTestProperties(args)

        #
        # This test aborts servers, so we don't want warnings.
        #
        properties.setProperty('Ice.Warn.Connections', '0')

        ports = []
        for arg in args:
            if arg[0] == '-':
                continue
            ports.append(int(arg))

        if len(ports) == 0:
            raise RuntimeError("no ports specified")

        with self.initialize(properties=properties) as communicator:
            AllTests.allTests(self, communicator, ports)
示例#41
0
def run(args, communicator):
    properties = communicator.getProperties()
    properties.setProperty("Ice.Warn.Dispatch", "0")
    properties.setProperty("TestAdapter.Endpoints", "default -p 12010")
    adapter = communicator.createObjectAdapter("TestAdapter")
    object = TestI.ThrowerI()
    adapter.add(object, communicator.stringToIdentity("thrower"))
    #adapter.activate() // Don't activate OA to ensure collocation is used.

    thrower = AllTests.allTests(communicator)

    return True
示例#42
0
def run(args, communicator):
    communicator.getProperties().setProperty("TestAdapter.Endpoints", "default -p 12010")
    adapter = communicator.createObjectAdapter("TestAdapter")
    prx = adapter.add(TestI.MyDerivedClassI(), communicator.stringToIdentity("test"))
    #adapter.activate() // Don't activate OA to ensure collocation is used.

    if prx.ice_getConnection():
        raise RuntimeError("collocation doesn't work")

    cl = AllTests.allTests(communicator)

    return True
示例#43
0
def run(args, communicator):
    myClass = AllTests.allTests(communicator, False)

    print "testing server shutdown...",
    myClass.shutdown()
    try:
        myClass.opVoid()
        test(False)
    except Ice.LocalException:
        print "ok"

    return True
示例#44
0
def run(args, communicator):
    properties = communicator.getProperties()
    properties.setProperty("Ice.Warn.Dispatch", "0")
    properties.setProperty("TestAdapter.Endpoints", "default -p 12010")
    adapter = communicator.createObjectAdapter("TestAdapter")
    object = TestI.ThrowerI()
    adapter.add(object, communicator.stringToIdentity("thrower"))
    adapter.activate()

    thrower = AllTests.allTests(communicator)

    return True
示例#45
0
文件: Client.py 项目: yuanbaopapa/ice
def run(args, communicator):
    myClass = AllTests.allTests(communicator)

    sys.stdout.write("testing server shutdown... ")
    sys.stdout.flush()
    myClass.shutdown()
    try:
        myClass.ice_timeout(100).ice_ping(); # Use timeout to speed up testing on Windows
        test(False)
    except Ice.LocalException:
        print("ok")

    return True
示例#46
0
文件: Client.py 项目: zhaochf/ice
def run(args, communicator):
    ports = []
    for arg in args[1:]:
        if arg[0] == '-':
            sys.stderr.write(args[0] + ": unknown option `" + arg + "'\n")
            usage(args[0])
            return False

        ports.append(int(arg))

    if len(ports) == 0:
        sys.stderr.write(args[0] + ": no ports specified\n")
        usage(args[0])
        return False

    try:
        AllTests.allTests(communicator, ports)
    except:
        traceback.print_exc()
        test(False)

    return True
示例#47
0
def run(args, communicator):
    communicator.getProperties().setProperty("TestAdapter.Endpoints",
                                             "default -p 12010")
    adapter = communicator.createObjectAdapter("TestAdapter")
    prx = adapter.add(TestI.MyDerivedClassI(), Ice.stringToIdentity("test"))
    #adapter.activate() // Don't activate OA to ensure collocation is used.

    if prx.ice_getConnection():
        raise RuntimeError("collocation doesn't work")

    cl = AllTests.allTests(communicator)

    return True
示例#48
0
def run(args, communicator):
    myClass = AllTests.allTests(communicator, False)

    sys.stdout.write("testing server shutdown... ")
    sys.stdout.flush()
    myClass.shutdown()
    try:
        myClass.opVoid()
        test(False)
    except Ice.LocalException:
        print("ok")

    return True
示例#49
0
文件: Client.py 项目: yuanbaopapa/ice
def run(args, communicator):
    ports = []
    for arg in args[1:]:
        if arg[0] == '-':
            sys.stderr.write(args[0] + ": unknown option `" + arg + "'\n")
            usage(args[0])
            return False

        ports.append(12010 + int(arg))

    if len(ports) == 0:
        sys.stderr.write(args[0] + ": no ports specified\n")
        usage(args[0])
        return False

    try:
        AllTests.allTests(communicator, ports)
    except:
        traceback.print_exc()
        test(False)

    return True
示例#50
0
def run(args, communicator):
    myClass = AllTests.allTests(communicator)

    sys.stdout.write("testing server shutdown... ")
    sys.stdout.flush()
    myClass.shutdown()
    try:
        myClass.opVoid()
        test(False)
    except Ice.LocalException:
        print("ok")

    return True
示例#51
0
def run(args, communicator):
    myClass = AllTests.allTests(communicator)

    sys.stdout.write("testing server shutdown... ")
    sys.stdout.flush()
    myClass.shutdown()
    try:
        myClass.ice_timeout(100).ice_ping()
        # Use timeout to speed up testing on Windows
        test(False)
    except Ice.LocalException:
        print("ok")

    return True
示例#52
0
文件: Client.py 项目: yuanbaopapa/ice
def run(args, communicator):
    initial = AllTests.allTests(communicator)
    initial.shutdown()
    return True
示例#53
0
def run(args, communicator):
    AllTests.allTests(communicator)
    return True
示例#54
0
def run(args, communicator):
    proxy = AllTests.allTests(communicator)
    proxy.shutdown()
    return True
示例#55
0
def run(args, communicator):
    AllTests.allTests(communicator)
    return True
示例#56
0
 def run(self, args):
     with self.initialize(args=args) as communicator:
         initial = AllTests.allTests(self, communicator)
         initial.shutdown()
示例#57
0
def run(args, communicator):
    custom = AllTests.allTests(communicator)
    custom.shutdown()
    return True
示例#58
0
文件: Client.py 项目: ming-hai/ice
def run(args, communicator):
    Test = AllTests.allTests(communicator)
    Test.shutdown()
    return True
示例#59
0
文件: Client.py 项目: Crysty-Yui/ice
 def run(self, args):
     AllTests.allTests(self.communicator())
     return 0