From c7473bca06f1ebadb8ceb2f02a8538b634139b20 Mon Sep 17 00:00:00 2001 From: Andrew Zhang <31313038+yzhan289@users.noreply.github.com> Date: Thu, 2 Sep 2021 15:23:20 -0400 Subject: [PATCH] Fix flaky test (#10035) * Fix base test bug * Add privilege * Add sleep * Remove create_file * Add docker requirement * Fix style * Fix more style --- datadog_checks_base/tests/conftest.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/datadog_checks_base/tests/conftest.py b/datadog_checks_base/tests/conftest.py index afa59e80924f2..e0ca6fe3a4cff 100644 --- a/datadog_checks_base/tests/conftest.py +++ b/datadog_checks_base/tests/conftest.py @@ -4,7 +4,7 @@ from datadog_checks.base.utils.platform import Platform from datadog_checks.dev import TempDir, docker_run, get_here -from datadog_checks.dev.conditions import CheckDockerLogs +from datadog_checks.dev.conditions import CheckDockerLogs, WaitFor HERE = get_here() @@ -114,6 +114,7 @@ def uds_path(): "UDS_HOST_DIRECTORY": tmp_dir, 'UDS_FILENAME': uds_filename, }, + conditions=[WaitFor(lambda: os.path.exists(uds_path))], ): yield uds_path