Documentation
¶
Overview ¶
Package enginetest builds durable-engine fixtures for tests in other packages.
It lives beside the engine rather than in internal/testutil because building one of these fixtures needs the engine itself. internal/engine has white-box test files in package engine, so if any of them ever imported internal/testutil and internal/testutil imported the engine, that would be an import cycle. A separate package cannot be walked into that way, and it also keeps the durable runtime out of the compile of every test binary that uses internal/testutil.
Nothing here is used by production code.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisteredQueuesDBPath ¶
RegisteredQueuesDBPath returns a per-test copy of a database in the state one daemon start leaves behind: the work queues registered, each with the limit the engine is configured with.
The source is built ONCE per test binary and copied for each test, in the same shape as testutil.GoldenUnifiedDBPath. Building it means starting and stopping a whole durable engine, which is expensive enough that doing it in several parallel tests loads the machine measurably; copying a file does not. Each caller gets its own copy, so a test that changes a queue setting cannot disturb another.
Types ¶
This section is empty.