From 987446d3c8b1d505f8f5d6ee13ea60a22b9818fe Mon Sep 17 00:00:00 2001 From: Tomer Heber Date: Tue, 25 Jun 2024 09:21:02 -0500 Subject: [PATCH] Fix: fix 029_provider flaky test by adding sleep --- tests/integration/029_provider/main.tf | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/tests/integration/029_provider/main.tf b/tests/integration/029_provider/main.tf index f20bad4e..e2cb1e2c 100644 --- a/tests/integration/029_provider/main.tf +++ b/tests/integration/029_provider/main.tf @@ -11,10 +11,17 @@ resource "env0_provider" "test_provider" { description = var.second_run ? "des1" : "des2" } -# TODO: uncomment when we fix 404 retry logic -# data "env0_provider" "test_provider_data" { -# type = env0_provider.test_provider.type -# } +resource "time_sleep" "wait_5_seconds" { + create_duration = "5s" + + depends_on = [env0_provider.test_provider] +} + +data "env0_provider" "test_provider_data" { + type = env0_provider.test_provider.type + + depends_on = [time_sleep.wait_5_seconds] +} resource "env0_provider" "test_provider-type-change" { type = var.second_run ? "aws2-${random_string.random.result}" : "aws1-${random_string.random.result}"