Exemplo n.º 1
0
        def createCumulusComputedValueGateway():
            def createCumulusGateway(callbackScheduler, vdm):
                result = CumulusGatewayRemote.RemoteGateway(
                    callbackScheduler, vdm, self.channelFactoryFactory(),
                    CumulusActiveMachines.CumulusActiveMachines(
                        self.sharedStateViewFactory),
                    self.sharedStateViewFactory)
                logging.info("Returing %s as createCumulusGateway", result)
                return result

            return ComputedValueGateway.CumulusComputedValueGateway(
                self.callbackScheduler.getFactory(), self.callbackScheduler,
                createCumulusGateway)
Exemplo n.º 2
0
def setUpComputedValueTest(tester):
    tester.graph = ComputedGraph.ComputedGraph()
    tester.graph.__enter__()

    def gatewayFactory(callbackScheduler, vdm):
        return CumulusGatewayInProcess.InProcessGateway(callbackSchedulerFactory, callbackScheduler, vdm)

    tester.computedValueGateway = \
            ComputedValueGateway.CumulusComputedValueGateway(
                callbackSchedulerFactory,
                callbackScheduler,
                gatewayFactory
                )
    tester.computedValueGateway.__enter__()
        def createCumulusComputedValueGateway():
            def createCumulusGateway(callbackScheduler, vdm):
                with harness.viewFactory:
                    result = CumulusGatewayInProcess.InProcessGateway(
                        harness.callbackScheduler.getFactory(),
                        harness.callbackScheduler, vdm, **kwds)

                    #pull out the inmemory s3 interface so that we can surface it
                    # and attach it to the connection object.

                    s3.append(result.s3Service)
                    return result

            return ComputedValueGateway.CumulusComputedValueGateway(
                harness.callbackScheduler.getFactory(),
                harness.callbackScheduler, createCumulusGateway)