@capture_logging(None)
    def test_scenario_throws_exception_if_overloaded(self, __logger):
        # XXX Update this test when we add tolerance for rate fluctuations.
        # See FLOC-3757.
        c = Clock()
        control_service = self.get_dropping_flocker_client_instance()
        cluster = self.make_cluster(control_service)
        target_rate = 10
        sample_size = 20
        s = write_request_load_scenario(
            c, cluster, request_rate=target_rate, sample_size=sample_size
        )
        dropped_rate = target_rate / 2
        seconds_to_overload = s.max_outstanding / dropped_rate

        s.start()
        # Reach initial rate
        control_service.drop_requests = True
        # Initially, we generate enough dropped requests so that the scenario
        # is overloaded when we start monitoring.
        c.pump(repeat(1, seconds_to_overload+1))
        # We stop dropping requests
        control_service.drop_requests = False
        # Now we generate the initial rate to start monitoring the scenario
        c.pump(repeat(1, sample_size))
        # We only need to advance one more second (first loop in the monitoring
        # loop) to trigger RequestOverload
        c.advance(1)

        failure = self.failureResultOf(s.maintained())
        self.assertIsInstance(failure.value, RequestOverload)
parse for `parse_content`
dataset/ETHPy150Open ClusterHQ/flocker/benchmark/scenarios/test/test_write_request_load.py/write_request_load_scenarioTest.test_scenario_throws_exception_if_overloaded--crossover with--dataset/ETHPy150Open TylerTemp/docpie/docpie/parser.py/OptionParser.parse_names_and_default