Documentation
¶
Overview ¶
Package testutil holds helpers shared by the core packages' tests.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func TempDir ¶
TempDir is t.TempDir for directories that hold SQLite files: the directory is removed after the test's later cleanups (database Close included) and the removal is retried for a few seconds.
shortcut: on Windows, Defender and the search indexer briefly open files that were just written; deleting such a file only marks it delete-pending, so removing the directory fails with "directory is not empty" for a few milliseconds. It happens with plain os.WriteFile files too (no handle of ours is open), and testing.T.TempDir retries only access-denied errors. Drop this helper when testing retries ERROR_DIR_NOT_EMPTY.
Types ¶
This section is empty.