@capture_logging(None)
    def test_scenario_stops_only_when_no_outstanding_requests(self, logger):
        c = Clock()

        control_service = self.get_error_response_client_instance(c)
        cluster = self.make_cluster(control_service)
        delay = 1

        control_service.delay = delay
        sample_size = 5
        s = write_request_load_scenario(
            c, cluster, request_rate=10, sample_size=sample_size
        )

        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))

        # Force the control service to fail requests for one second.
        # These requests will fail after the delay period set in the
        # control service.
        control_service.fail_requests = True
        c.advance(1)
        control_service.fail_requests = False

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

        # The scenario should not successfully stop until after the
        # delay period for the failed requests.
        self.assertNoResult(d)
        c.advance(delay)

        # The scenario requests that failed will have been logged.
        logger.flushTracebacks(FakeNetworkError)

        self.successResultOf(d)
Build up a graph (nodes and edges from a Bro conn.log)
dataset/ETHPy150Open ClusterHQ/flocker/benchmark/scenarios/test/test_write_request_load.py/write_request_load_scenarioTest.test_scenario_stops_only_when_no_outstanding_requests--crossover with--dataset/ETHPy150Open SuperCowPowers/workbench/workbench/workers/pcap_graph.py/PcapGraph.conn_log_graph