async def test_end_to_evaluation_trips_circuit_breaker():
    agent = Agent(domain='data/test_domains/default.yml', policies=[MemoizationPolicy(max_history=11)])
    training_data = (await agent.load_data(STORY_FILE_TRIPS_CIRCUIT_BREAKER))
    agent.train(training_data)
    generator = (await _create_data_generator(E2E_STORY_FILE_TRIPS_CIRCUIT_BREAKER, agent, use_e2e=True))
    test_stories = generator.generate_story_trackers()
    (story_evaluation, num_stories) = (await _collect_story_predictions(test_stories, agent, use_e2e=True))
    circuit_trip_predicted = ['utter_greet', 'utter_greet', 'utter_greet', 'utter_greet', 'utter_greet', 'utter_greet', 'utter_greet', 'utter_greet', 'utter_greet', 'utter_greet', 'circuit breaker tripped', 'circuit breaker tripped']
    assert (story_evaluation.evaluation_store.action_predictions == circuit_trip_predicted)
    assert (num_stories == 1)
async def test_end_to_evaluation_trips_circuit_breaker():
    agent = Agent(domain='data/test_domains/default.yml', policies=[MemoizationPolicy(max_history=11)])
    training_data = (await agent.load_data(STORY_FILE_TRIPS_CIRCUIT_BREAKER))
    agent.train(training_data)
    generator = (await _create_data_generator(E2E_STORY_FILE_TRIPS_CIRCUIT_BREAKER, agent, use_e2e=True))
    test_stories = generator.generate_story_trackers()
    (story_evaluation, num_stories) = (await _collect_story_predictions(test_stories, agent, use_e2e=True))
    circuit_trip_predicted = ['utter_greet', 'utter_greet', 'utter_greet', 'utter_greet', 'utter_greet', 'utter_greet', 'utter_greet', 'utter_greet', 'utter_greet', 'utter_greet', 'circuit breaker tripped', 'circuit breaker tripped']
    assert (story_evaluation.evaluation_store.action_predictions == circuit_trip_predicted)
    assert (num_stories == 1)