userver: utest Namespace Reference
Loading...
Searching...
No Matches
utest Namespace Reference

Detailed Description

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::ClientCreateHttpClient ()
 
std::shared_ptr< clients::http::ClientCreateHttpClient (engine::TaskProcessor &fs_task_processor)
 
std::shared_ptr< clients::http::ClientCreateHttpClient (const tracing::TracingManagerBase &tracing_manager)
 
constexpr std::chrono::seconds kMaxTestWaitTime (20)
 

Function Documentation

◆ CurrentProcessOpenFiles()

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.

◆ kMaxTestWaitTime()

constexpr std::chrono::seconds utest::kMaxTestWaitTime ( 20 )
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.