Ejemplo n.º 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)
Ejemplo n.º 2
0
Archivo: Client.py Proyecto: 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)
Ejemplo n.º 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)
Ejemplo n.º 4
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)
Ejemplo n.º 5
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)
Ejemplo n.º 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)
Ejemplo n.º 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
Ejemplo n.º 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
Ejemplo n.º 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
Ejemplo n.º 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
Ejemplo n.º 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
Ejemplo n.º 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()
Ejemplo n.º 13
0
 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)
Ejemplo n.º 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()
Ejemplo n.º 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)
Ejemplo n.º 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
Ejemplo n.º 17
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)
Ejemplo n.º 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
Ejemplo n.º 19
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() // Don't activate OA to ensure collocation is used.

        AllTests.allTests(self.communicator())

        adapter.waitForDeactivate()
        return 0
Ejemplo n.º 20
0
 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()
Ejemplo n.º 21
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()
Ejemplo n.º 22
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)
Ejemplo n.º 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()
Ejemplo n.º 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)
Ejemplo n.º 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
Ejemplo n.º 26
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
Ejemplo n.º 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
Ejemplo n.º 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
Ejemplo n.º 29
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()
Ejemplo n.º 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()
Ejemplo n.º 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()
Ejemplo n.º 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()
Ejemplo n.º 33
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()
Ejemplo n.º 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()
Ejemplo n.º 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
Ejemplo n.º 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
Ejemplo n.º 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
Ejemplo n.º 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
Ejemplo n.º 39
0
Archivo: Client.py Proyecto: 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)
Ejemplo n.º 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)
Ejemplo n.º 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
Ejemplo n.º 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
Ejemplo n.º 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
Ejemplo n.º 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
Ejemplo n.º 45
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
Ejemplo n.º 46
0
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
Ejemplo n.º 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
Ejemplo n.º 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
Ejemplo n.º 49
0
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
Ejemplo n.º 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
Ejemplo n.º 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
Ejemplo n.º 52
0
def run(args, communicator):
    initial = AllTests.allTests(communicator)
    initial.shutdown()
    return True
Ejemplo n.º 53
0
def run(args, communicator):
    AllTests.allTests(communicator)
    return True
Ejemplo n.º 54
0
def run(args, communicator):
    proxy = AllTests.allTests(communicator)
    proxy.shutdown()
    return True
Ejemplo n.º 55
0
def run(args, communicator):
    AllTests.allTests(communicator)
    return True
Ejemplo n.º 56
0
 def run(self, args):
     with self.initialize(args=args) as communicator:
         initial = AllTests.allTests(self, communicator)
         initial.shutdown()
Ejemplo n.º 57
0
def run(args, communicator):
    custom = AllTests.allTests(communicator)
    custom.shutdown()
    return True
Ejemplo n.º 58
0
def run(args, communicator):
    Test = AllTests.allTests(communicator)
    Test.shutdown()
    return True
Ejemplo n.º 59
0
 def run(self, args):
     AllTests.allTests(self.communicator())
     return 0