Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions tests/system/providers/amazon/aws/example_athena.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,13 +102,15 @@ 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(
task_id="create_table",
query=query_create_table,
database=athena_database,
output_location=f"s3://{s3_bucket}/",
sleep_time=1,
)

# [START howto_operator_athena]
Expand All @@ -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(
Expand All @@ -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(
Expand All @@ -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(
Expand Down
4 changes: 4 additions & 0 deletions tests/system/providers/amazon/aws/example_batch.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,13 +178,15 @@ 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(
task_id="wait_for_job_queue_valid",
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(
Expand All @@ -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(
Expand Down
2 changes: 2 additions & 0 deletions tests/system/providers/amazon/aws/example_cloudformation.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -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
Expand Down
2 changes: 2 additions & 0 deletions tests/system/providers/amazon/aws/example_dms.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand All @@ -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(
Expand Down
1 change: 1 addition & 0 deletions tests/system/providers/amazon/aws/example_lambda.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
1 change: 1 addition & 0 deletions tests/system/providers/amazon/aws/example_quicksight.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 2 additions & 0 deletions tests/system/providers/amazon/aws/example_sagemaker.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -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(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down