You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by po...@apache.org on 2022/08/27 02:12:14 UTC
[airflow] branch main updated: Fix EMR serverless system test (#25969)
This is an automated email from the ASF dual-hosted git repository.
potiuk pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/main by this push:
new b75797e809 Fix EMR serverless system test (#25969)
b75797e809 is described below
commit b75797e80954df1e67dbc63dec874db0457244e7
Author: Vincent <97...@users.noreply.github.com>
AuthorDate: Fri Aug 26 22:12:07 2022 -0400
Fix EMR serverless system test (#25969)
---
airflow/providers/amazon/aws/sensors/emr.py | 2 --
tests/system/providers/amazon/aws/example_emr_serverless.py | 2 ++
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/airflow/providers/amazon/aws/sensors/emr.py b/airflow/providers/amazon/aws/sensors/emr.py
index 7c09e2fb89..b6c785f87f 100644
--- a/airflow/providers/amazon/aws/sensors/emr.py
+++ b/airflow/providers/amazon/aws/sensors/emr.py
@@ -214,8 +214,6 @@ class EmrServerlessApplicationSensor(BaseSensorOperator):
super().__init__(**kwargs)
def poke(self, context: 'Context') -> bool:
- state = None
-
response = self.hook.conn.get_application(applicationId=self.application_id)
state = response['application']['state']
diff --git a/tests/system/providers/amazon/aws/example_emr_serverless.py b/tests/system/providers/amazon/aws/example_emr_serverless.py
index 9dad8f7d88..2a5450b796 100644
--- a/tests/system/providers/amazon/aws/example_emr_serverless.py
+++ b/tests/system/providers/amazon/aws/example_emr_serverless.py
@@ -40,6 +40,7 @@ sys_test_context_task = SystemTestContextBuilder().add_variable(ROLE_ARN_KEY).bu
with DAG(
dag_id=DAG_ID,
+ schedule='@once',
start_date=datetime(2021, 1, 1),
tags=['example'],
catchup=False,
@@ -70,6 +71,7 @@ with DAG(
release_label='emr-6.6.0',
job_type="SPARK",
config={'name': 'new_application'},
+ wait_for_completion=False,
)
# [END howto_operator_emr_serverless_create_application]