Mocks and test helpers.
Classes | |
class | DefaultLoggerFixture |
Fixture that allows to set the default logger and manages its lifetime. More... | |
class | DnsServerMock |
class | HttpServerMock |
class | LogCaptureFixture |
Fixture that allows to capture and extract log. More... | |
struct | PrintTestName |
Test name printer for parameterized tests written in gtest. More... | |
class | SimpleServer |
Functions | |
std::vector< std::string > | CurrentProcessOpenFiles () |
returns files opened by current process | |
std::shared_ptr< clients::http::Client > | CreateHttpClient () |
std::shared_ptr< clients::http::Client > | CreateHttpClient (engine::TaskProcessor &fs_task_processor) |
std::shared_ptr< clients::http::Client > | CreateHttpClient (const tracing::TracingManagerBase &tracing_manager) |
constexpr std::chrono::seconds | kMaxTestWaitTime (20) |
std::vector< std::string > utest::CurrentProcessOpenFiles | ( | ) |
returns files opened by current process
jemalloc opens /proc/sys/vm/overcommit_memory, other libraries may also open some files randomly. To avoid problems in tests and make them reliable check files for specific prefix.
|
inlineconstexpr |
The maximum time a typical test is allowed to execute. If exceeded, a deadlock is assumed. This time must not be too low to avoid flaky tests.