diff --git a/plugins/outputs/sql/sql_test.go b/plugins/outputs/sql/sql_test.go index 9624bed30..a8ef3419c 100644 --- a/plugins/outputs/sql/sql_test.go +++ b/plugins/outputs/sql/sql_test.go @@ -225,7 +225,10 @@ func TestMysqlIntegration(t *testing.T) { require.NoError(t, err) require.Equal(t, 0, rc) dumpfile := filepath.Join(outDir, "dump") - require.FileExists(t, dumpfile) + require.Eventually(t, func() bool { + _, err := os.Stat(dumpfile) + return !os.IsNotExist(err) + }, 5*time.Second, 10*time.Millisecond) //compare the dump to what we expected expected, err := os.ReadFile("testdata/mariadb/expected.sql")