Beispiel #1
0
def pump_it(lamd, use_poisson):
    from cilantro.utils.test import God
    from cilantro.logger import get_logger, overwrite_logger_level
    import logging

    overwrite_logger_level(logging.WARNING)
    God.pump_it(rate=lamd, use_poisson=use_poisson)
Beispiel #2
0
def dump_it(volume):
    from cilantro.utils.test import God
    from cilantro.logger import get_logger, overwrite_logger_level
    import logging

    overwrite_logger_level(logging.WARNING)
    God.dump_it(volume=volume)
Beispiel #3
0
    def __init__(self, *args, **kwargs):
        super().__init__(*args, **kwargs)

        # Set God's Masternode URL to use this guy updated port if we are running on VM
        if MPTestCase.vmnet_test_active:
            node_ports = MPTestCase.ports[self.container_name]
            assert '8080' in node_ports, "Expected port 8080 to be available in Falcon's docker external port thing"
            God.set_mn_url(ip='127.0.0.1',
                           port=node_ports['8080'].split(':')[-1])
Beispiel #4
0
def pump_it(lamd, use_poisson):
    from cilantro.utils.test import God
    from cilantro.logger import get_logger, overwrite_logger_level
    import logging

    overwrite_logger_level(logging.WARNING)

    log = get_logger("Mr. Pump")
    log.important("Starting the pump")

    God.pump_it(rate=lamd, use_poisson=use_poisson)
Beispiel #5
0
    def __init__(self, *args, **kwargs):
        self.log = get_logger("MPMasternode")
        self.log.critical("Calling base class init on MPMasternode's __init__")
        super().__init__(*args, **kwargs)
        self.log.critical("base class init done on MPMasternode's __init__")

        # self.log.critical("vmnet_test_active: {}".format(MPTestCase.vmnet_test_active))

        # Set God's Masternode URL to use this guy updated port if we are running on VM
        if MPTestCase.vmnet_test_active:
            node_ports = MPTestCase.ports[self.container_name]
            assert '8080' in node_ports, "Expected port 8080 to be available in Falcon's docker external port thing"
            God.set_mn_url(ip='127.0.0.1', port=node_ports['8080'].split(':')[-1])
Beispiel #6
0
    def build_obj(cls) -> tuple:
        loop = asyncio.get_event_loop()
        god = God(loop=loop)

        return god, loop, [god.interface._recv_messages()]
Beispiel #7
0
def pump_it(lamd, use_poisson):
    from cilantro.utils.test import God
    God.pump_it(rate=lamd, gen_func=God.random_std_tx, use_poisson=use_poisson)