remove eventually files

This commit is contained in:
Shreyas Goenka 2025-02-04 15:44:03 +01:00
parent 981dbf787d
commit 918af62827
No known key found for this signature in database
GPG Key ID: 92A07DF49CCB0622
2 changed files with 0 additions and 20 deletions

View File

@ -24,7 +24,6 @@ import (
"github.com/databricks/cli/libs/testdiff"
"github.com/databricks/cli/libs/testserver"
"github.com/databricks/databricks-sdk-go"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
@ -289,21 +288,6 @@ func runTest(t *testing.T, dir, coverDir string, repls testdiff.ReplacementsCont
cmd.Dir = tmpDir
err = cmd.Run()
// Wait for the files to appear before starting assertion on the output.
// This is useful for concurrency control when the CLI spawns subprocesses.
missingFiles := config.EventuallyFiles
assert.Eventually(t, func() bool {
for _, file := range missingFiles {
_, err := os.Stat(filepath.Join(tmpDir, file))
if err == nil {
missingFiles = slices.DeleteFunc(missingFiles, func(n string) bool {
return n == file
})
}
}
return len(missingFiles) == 0
}, 10*time.Second, 100*time.Millisecond, "Files did not appear: %v", missingFiles)
// Write the requests made to the server to a output file if the test is
// configured to record requests.
if config.RecordRequests {

View File

@ -47,10 +47,6 @@ type TestConfig struct {
// Record the requests made to the server and write them as output to
// out.requests.txt
RecordRequests bool
// Wait for these files to appear before starting assertion on the output.
// This is useful for concurrency control when tests spawn subprocesses.
EventuallyFiles []string
}
type ServerStub struct {