<!--

Welcome to Apache Airflow!  For a smooth issue process, try to answer the following questions.
Don't worry if they're not all applicable; just try to include what you can :-)

If you need to include code snippets or logs, please put them in fenced code
blocks.  If they're super-long, please use the details tag like
<details><summary>super-long log</summary> lots of stuff </details>

Please delete these comment blocks before submitting the issue.

-->

**Description**

Related to the discussion here: https://github.com/apache/airflow/pull/8553#discussion_r416136954

Allow user to define expected terminal state. e.g. `JOB_STATE_CANCELLED` could be not treated as failure but expected terminal state.


<!-- A short description of your feature -->


)
DEFAULT_RUNNER = "DirectRunner"
BEAM_STRING = "airflow.providers.apache.beam.hooks.beam.{}"
TASK_ID = "test-dataflow-operator"
JOB_NAME = "test-dataflow-pipeline"
MOCK_UUID = UUID("cf4a56d2-8101-4217-b027-2af6216feb48")
MOCK_UUID_PREFIX = str(MOCK_UUID)[:8]
UNIQUE_JOB_NAME = f"test-dataflow-pipeline-{MOCK_UUID_PREFIX}"
TEST_TEMPLATE = "gs://dataflow-templates/wordcount/template_file"
PARAMETERS = {
    "inputFile": "gs://dataflow-samples/shakespeare/kinglear.txt",
    "output": "gs://test/output/my_output",
}
TEST_ENVIRONMENT = {}
PY_FILE = "apache_beam.examples.wordcount"
JAR_FILE = "unitest.jar"
JOB_CLASS = "com.example.UnitTest"
PY_OPTIONS = ["-m"]
DATAFLOW_VARIABLES_PY = {"project": "test", "staging_location": "gs://test/staging", "labels": {"foo": "bar"}}
DATAFLOW_VARIABLES_JAVA = {
    "project": "test",
    "stagingLocation": "gs://test/staging",
    "labels": {"foo": "bar"},
}
RUNTIME_ENV = {
    "additionalExperiments": ["exp_flag1", "exp_flag2"],
    "additionalUserLabels": {"name": "wrench", "mass": "1.3kg", "count": "3"},
    "bypassTempDirValidation": {},
    "ipConfiguration": "WORKER_IP_PRIVATE",
    "kmsKeyName": (