class_docstr: Test waiters from ``amazon/aws/waiters/batch.json``.
class_docstr_tok: ["Test","waiters","from","``","amazon\/aws\/waiters\/batch.json","``","."]
docstr: Test job failed
code: def test_job_failed(self, mock_describe_jobs):
      """Test job failed"""
      mock_describe_jobs.side_effect = [
          self.describe_jobs(BatchClientHook.RUNNING_STATE),
          self.describe_jobs(BatchClientHook.FAILURE_STATE),
      ]
      waiter = BatchClientHook(aws_conn_id=None).get_waiter(
          "batch_job_complete"
      )
  
      with pytest.raises(
          WaiterError,
          match="Waiter encountered a terminal failure state",
      ):
          waiter.wait(
              jobs=[self.JOB_ID],
              WaiterConfig={"Delay": 0.01, "MaxAttempts": 2},
          )
  
imports: from __future__ import annotations
  import json
  from typing import Sequence
  from unittest import mock
  import boto3
  import pytest
  from botocore.exceptions import WaiterError
  from botocore.waiter import WaiterModel
  from moto import mock_eks
  from airflow.providers.amazon.aws.hooks.base_aws import AwsBaseHook
  from airflow.providers.amazon.aws.hooks.batch_client import BatchClientHook
  from airflow.providers.amazon.aws.hooks.dynamodb import DynamoDBHook
  from airflow.providers.amazon.aws.hooks.ecs import EcsClusterStates, EcsHook, EcsTaskDefinitionStates
  from airflow.providers.amazon.aws.hooks.eks import EksHook
  from airflow.providers.amazon.aws.hooks.emr import EmrHook
  from airflow.providers.amazon.aws.waiters.base_waiter import BaseBotoWaiter
label_desc: Use image node_id 6 for calling the TestCustomBatchServiceWaiters obj's underlying member method code with example usage: obj.test_job_failed(mock_describe_jobs) without return types