Exemplo n.º 1
0
    def setUpClass(cls):
        super(TestCase, cls).setUpClass()

        cls._dangling_mocks = set()
        cls._mocks_before = cls._find_mock_refs()

        root_logger.DefaultRootLogger(enable_backtrace=False)
Exemplo n.º 2
0
    def setUpClass(cls):
        # Number of nested levels to examine when searching for mocks.
        # Higher setting will potentially uncover more dangling objects,
        # at the cost of increased scanning time.
        cls._max_recursion_depth = int(
            os.getenv('TROVE_TESTS_UNMOCK_RECURSION_DEPTH', 2))
        # Should we skip the remaining tests after the first failure.
        cls._fail_fast = cls.is_bool(
            os.getenv('TROVE_TESTS_UNMOCK_FAIL_FAST', False))
        # Should we report only unique dangling mock references.
        cls._only_unique = cls.is_bool(
            os.getenv('TROVE_TESTS_UNMOCK_ONLY_UNIQUE', True))

        cls._dangling_mocks = set()
        root_logger.DefaultRootLogger(enable_backtrace=False)
Exemplo n.º 3
0
def initialize_trove(config_file):
    from trove.common import pastedeploy

    root_logger.DefaultRootLogger()

    cfg.CONF(args=[], project='trove', default_config_files=[config_file])
    logging.setup(CONF, None)
    topic = CONF.taskmanager_queue
    rpc.init(CONF)

    taskman_service = rpc_service.RpcService(
        CONF.taskmanager_rpc_encr_key,
        topic=topic,
        rpc_api_version=rpc_version.RPC_API_VERSION,
        manager='trove.taskmanager.manager.Manager')
    taskman_service.start()

    return pastedeploy.paste_deploy_app(config_file, 'trove', {})
Exemplo n.º 4
0
 def setUpClass(cls):
     super(TestCase, cls).setUpClass()
     root_logger.DefaultRootLogger(enable_backtrace=False)