@capture_logging(None)
    def test_scenario_timeouts_if_requests_not_completed(self, _logger):
        c = Clock()

        control_service = self.get_error_response_client_instance(c)
        cluster = self.make_cluster(control_service)
        sample_size = 5
        s = write_request_load_scenario(
            c, cluster, request_rate=10, sample_size=sample_size
        )

        # Set the delay for the requests to be longer than the scenario
        # timeout
        control_service.delay = s.timeout + 10

        d = s.start()
        s.maintained().addBoth(lambda x: self.fail())

        # Advance the clock by `sample_size` seconds to establish the
        # requested rate.
        c.pump(repeat(1, sample_size))

        control_service.fail_requests = True
        c.advance(1)
        control_service.fail_requests = False

        d.addCallback(lambda ignored: s.stop())

        # Advance the clock by the timeout value so it is triggered
        # before the requests complete.
        self.assertNoResult(d)
        c.advance(s.timeout + 1)
        self.assertTrue(s.rate_measurer.outstanding() > 0)
        self.successResultOf(d)
``write_request_load_scenario`` should timeout if the outstanding
dataset/ETHPy150Open ClusterHQ/flocker/benchmark/scenarios/test/test_write_request_load.py/write_request_load_scenarioTest.test_scenario_timeouts_if_requests_not_completed