databricks / cli

Databricks CLI
Other
132 stars 50 forks source link

Add trailing slash to directory to produce completions for #1666

Closed pietern closed 1 month ago

pietern commented 1 month ago

Changes

The integration test for fs ls tried to produce completions for the temporary directory without a trailing slash. The command will list the parent directory to see if there are more directories with the same prefix that are also valid completions. The test intends to test completions for files inside the temporary directory, so we need that trailing slash.

This test was hanging because the parent directory of the temporary DBFS directory has more than 1k entries (on our integration testing workspaces) and the line buffer in the test runner has a capacity of 1k lines. To avoid the same hang in the future, this change modifies the test runner to panic if the line buffer is full.

Tests

Confirmed the integration test no longer hangs.