diff --git a/tests/system/providers/amazon/aws/example_athena.py b/tests/system/providers/amazon/aws/example_athena.py index e4bc8190f8e39..3d2487d7b56a4 100644 --- a/tests/system/providers/amazon/aws/example_athena.py +++ b/tests/system/providers/amazon/aws/example_athena.py @@ -102,6 +102,7 @@ def read_results_from_s3(bucket_name, query_execution_id): query=query_create_database, database=athena_database, output_location=f"s3://{s3_bucket}/", + sleep_time=1, ) create_table = AthenaOperator( @@ -109,6 +110,7 @@ def read_results_from_s3(bucket_name, query_execution_id): query=query_create_table, database=athena_database, output_location=f"s3://{s3_bucket}/", + sleep_time=1, ) # [START howto_operator_athena] @@ -119,6 +121,7 @@ def read_results_from_s3(bucket_name, query_execution_id): output_location=f"s3://{s3_bucket}/", ) # [END howto_operator_athena] + read_table.sleep_time = 1 # [START howto_sensor_athena] await_query = AthenaSensor( @@ -133,6 +136,7 @@ def read_results_from_s3(bucket_name, query_execution_id): database=athena_database, output_location=f"s3://{s3_bucket}/", trigger_rule=TriggerRule.ALL_DONE, + sleep_time=1, ) drop_database = AthenaOperator( @@ -141,6 +145,7 @@ def read_results_from_s3(bucket_name, query_execution_id): database=athena_database, output_location=f"s3://{s3_bucket}/", trigger_rule=TriggerRule.ALL_DONE, + sleep_time=1, ) delete_s3_bucket = S3DeleteBucketOperator( diff --git a/tests/system/providers/amazon/aws/example_batch.py b/tests/system/providers/amazon/aws/example_batch.py index 474fa6be8cc4e..1937127fcd33c 100644 --- a/tests/system/providers/amazon/aws/example_batch.py +++ b/tests/system/providers/amazon/aws/example_batch.py @@ -178,6 +178,7 @@ def delete_job_queue(job_queue_name): compute_environment=batch_job_compute_environment_name, ) # [END howto_sensor_batch_compute_environment] + wait_for_compute_environment_valid.poke_interval = 1 # [START howto_sensor_batch_job_queue] wait_for_job_queue_valid = BatchJobQueueSensor( @@ -185,6 +186,7 @@ def delete_job_queue(job_queue_name): job_queue=batch_job_queue_name, ) # [END howto_sensor_batch_job_queue] + wait_for_job_queue_valid.poke_interval = 1 # [START howto_operator_batch] submit_batch_job = BatchOperator( @@ -209,11 +211,13 @@ def delete_job_queue(job_queue_name): wait_for_compute_environment_disabled = BatchComputeEnvironmentSensor( task_id="wait_for_compute_environment_disabled", compute_environment=batch_job_compute_environment_name, + poke_interval=1, ) wait_for_job_queue_modified = BatchJobQueueSensor( task_id="wait_for_job_queue_modified", job_queue=batch_job_queue_name, + poke_interval=1, ) wait_for_job_queue_deleted = BatchJobQueueSensor( diff --git a/tests/system/providers/amazon/aws/example_cloudformation.py b/tests/system/providers/amazon/aws/example_cloudformation.py index a7c5d9d727f33..fc6e04d422081 100644 --- a/tests/system/providers/amazon/aws/example_cloudformation.py +++ b/tests/system/providers/amazon/aws/example_cloudformation.py @@ -79,6 +79,7 @@ stack_name=cloudformation_stack_name, ) # [END howto_sensor_cloudformation_create_stack] + wait_for_stack_create.poke_interval = 10 # [START howto_operator_cloudformation_delete_stack] delete_stack = CloudFormationDeleteStackOperator( @@ -94,6 +95,7 @@ stack_name=cloudformation_stack_name, ) # [END howto_sensor_cloudformation_delete_stack] + wait_for_stack_delete.poke_interval = 10 chain( # TEST SETUP diff --git a/tests/system/providers/amazon/aws/example_dms.py b/tests/system/providers/amazon/aws/example_dms.py index fea57af1719c5..8e13e17c32e79 100644 --- a/tests/system/providers/amazon/aws/example_dms.py +++ b/tests/system/providers/amazon/aws/example_dms.py @@ -352,6 +352,7 @@ def delete_security_group(security_group_id: str, security_group_name: str): replication_task_arn=task_arn, target_statuses=["running"], termination_statuses=["stopped", "deleting", "failed"], + poke_interval=10, ) # [START howto_operator_dms_stop_task] @@ -368,6 +369,7 @@ def delete_security_group(security_group_id: str, security_group_name: str): replication_task_arn=task_arn, ) # [END howto_sensor_dms_task_completed] + await_task_stop.poke_interval = 10 # [START howto_operator_dms_delete_task] delete_task = DmsDeleteTaskOperator( diff --git a/tests/system/providers/amazon/aws/example_lambda.py b/tests/system/providers/amazon/aws/example_lambda.py index e1222d91bfcc9..505681f6b2332 100644 --- a/tests/system/providers/amazon/aws/example_lambda.py +++ b/tests/system/providers/amazon/aws/example_lambda.py @@ -97,6 +97,7 @@ def delete_lambda(function_name: str): function_name=lambda_function_name, ) # [END howto_sensor_lambda_function_state] + wait_lambda_function_state.poke_interval = 1 # [START howto_operator_invoke_lambda_function] invoke_lambda_function = AwsLambdaInvokeFunctionOperator( diff --git a/tests/system/providers/amazon/aws/example_quicksight.py b/tests/system/providers/amazon/aws/example_quicksight.py index 3095cf01bcff0..bc3cbd2abd31e 100644 --- a/tests/system/providers/amazon/aws/example_quicksight.py +++ b/tests/system/providers/amazon/aws/example_quicksight.py @@ -190,6 +190,7 @@ def delete_ingestion(aws_account_id: str, dataset_name: str, ingestion_name: str ingestion_id=ingestion_id, ) # [END howto_sensor_quicksight] + await_job.poke_interval = 10 delete_bucket = S3DeleteBucketOperator( task_id="delete_s3_bucket", diff --git a/tests/system/providers/amazon/aws/example_sagemaker.py b/tests/system/providers/amazon/aws/example_sagemaker.py index 0d4d498e4cf30..9506970446320 100644 --- a/tests/system/providers/amazon/aws/example_sagemaker.py +++ b/tests/system/providers/amazon/aws/example_sagemaker.py @@ -527,6 +527,7 @@ def delete_docker_image(image_name): # [START howto_sensor_sagemaker_auto_ml] await_automl = SageMakerAutoMLSensor(job_name=test_setup["auto_ml_job_name"], task_id="await_auto_ML") # [END howto_sensor_sagemaker_auto_ml] + await_automl.poke_interval = 10 # [START howto_operator_sagemaker_start_pipeline] start_pipeline1 = SageMakerStartPipelineOperator( @@ -553,6 +554,7 @@ def delete_docker_image(image_name): pipeline_exec_arn=start_pipeline2.output, ) # [END howto_sensor_sagemaker_pipeline] + await_pipeline2.poke_interval = 10 # [START howto_operator_sagemaker_experiment] create_experiment = SageMakerCreateExperimentOperator( diff --git a/tests/system/providers/amazon/aws/example_step_functions.py b/tests/system/providers/amazon/aws/example_step_functions.py index e28746354706f..b33a25e48b1aa 100644 --- a/tests/system/providers/amazon/aws/example_step_functions.py +++ b/tests/system/providers/amazon/aws/example_step_functions.py @@ -92,6 +92,7 @@ def delete_state_machine(state_machine_arn): task_id="wait_for_execution", execution_arn=execution_arn ) # [END howto_sensor_step_function_execution] + wait_for_execution.poke_interval = 1 # [START howto_operator_step_function_get_execution_output] get_execution_output = StepFunctionGetExecutionOutputOperator(