databricks-cli/acceptance/bundle
Denis Bilenko 6b1a778fe1
Fix flaky acceptance test (#2310)
## Changes
Replace timestamps with fixed string before output is sorted (and before
test runner replacements are applied).

Otherwise the test sometimes fails with error below. Note, timestamps
themselves do not show it, because they were replaced.

```
    --- FAIL: TestAccept/bundle/debug (0.78s)
        acceptance_test.go:404: Diff:
            --- bundle/debug/out.stderr.parallel.txt
            +++ /var/folders/5y/9kkdnjw91p11vsqwk0cvmk200000gp/T/TestAcceptbundledebug1859985035/001/out.stderr.parallel.txt
            @@ -8,8 +8,8 @@
             10:07:59 Debug: ApplyReadOnly pid=12345 mutator=validate mutator (read-only)=parallel mutator (read-only)=validate:files_to_sync
             10:07:59 Debug: ApplyReadOnly pid=12345 mutator=validate mutator (read-only)=parallel mutator (read-only)=validate:folder_permissions
             10:07:59 Debug: ApplyReadOnly pid=12345 mutator=validate mutator (read-only)=parallel mutator (read-only)=validate:validate_sync_patterns
            -10:07:59 Debug: Path /Workspace/Users/[USERNAME]/.bundle/debug/default/files has type directory (ID: 0) pid=12345 mutator=validate mutator (read-only)=parallel mutator (read-only)=validate:files_to_sync
             10:07:59 Debug: non-retriable error:  pid=12345 mutator=validate mutator (read-only)=parallel mutator (read-only)=validate:files_to_sync sdk=true
            +10:07:59 Debug: Path /Workspace/Users/[USERNAME]/.bundle/debug/default/files has type directory (ID: 0) pid=12345 mutator=validate mutator (read-only)=parallel mutator (read-only)=validate:files_to_sync
             < {} pid=12345 mutator=validate mutator (read-only)=parallel mutator (read-only)=validate:files_to_sync sdk=true
             < {} pid=12345 mutator=validate mutator (read-only)=parallel mutator (read-only)=validate:files_to_sync sdk=true
             < } pid=12345 mutator=validate mutator (read-only)=parallel mutator (read-only)=validate:files_to_sync sdk=true
```

## Tests
Running `hyperfine --min-runs 10 'go test ../.. -run
^TestAccept$/^bundle$/^debug$ -count=1' --show-output` detects flakiness
on main but not with this PR.
2025-02-07 16:17:50 +00:00
..
debug Fix flaky acceptance test (#2310) 2025-02-07 16:17:50 +00:00
git-permerror Always print warnings and errors; clean up format (#2213) 2025-02-07 11:29:40 +00:00
help acc: Use [VARNAME] instead of $VARNAME (#2282) 2025-02-03 14:10:19 +00:00
includes/non_yaml_in_include accept JSON includes (#2265) 2025-02-04 19:28:19 +01:00
override acc: Use [VARNAME] instead of $VARNAME (#2282) 2025-02-03 14:10:19 +00:00
paths acc: Use [VARNAME] instead of $VARNAME (#2282) 2025-02-03 14:10:19 +00:00
quality_monitor acc: Use [VARNAME] instead of $VARNAME (#2282) 2025-02-03 14:10:19 +00:00
scripts Extend testserver for deployment (#2299) 2025-02-07 10:26:20 +00:00
syncroot acc: Use [VARNAME] instead of $VARNAME (#2282) 2025-02-03 14:10:19 +00:00
templates Add a couple of tests for bundle init with custom template (#2293) 2025-02-07 13:13:12 +00:00
undefined_resources Migrate bundle/tests/undefined_resources_test.go to acceptance test (#2106) 2025-01-09 15:21:24 +00:00
variables acc: Use [VARNAME] instead of $VARNAME (#2282) 2025-02-03 14:10:19 +00:00