Remove explicit verbosity level changes in tests.

This commit is contained in:
levlam 2021-11-21 21:41:11 +03:00
parent 5e34f07641
commit a28b5f2fbb
7 changed files with 2 additions and 12 deletions

View File

@ -91,7 +91,6 @@ class TimeoutManager final : public td::Actor {
td::int32 TimeoutManager::count;
TEST(MultiTimeout, Destroy) {
SET_VERBOSITY_LEVEL(VERBOSITY_NAME(ERROR));
td::ConcurrentScheduler sched;
int threads_n = 0;
sched.init(threads_n);

View File

@ -72,7 +72,6 @@ static td::ExitGuard exit_guard;
#if TD_LINUX || TD_DARWIN
TEST(Misc, update_atime_saves_mtime) {
SET_VERBOSITY_LEVEL(VERBOSITY_NAME(ERROR));
td::string name = "test_file";
td::unlink(name).ignore();
auto r_file = td::FileFd::open(name, td::FileFd::Read | td::FileFd::Flags::Create | td::FileFd::Flags::Truncate);
@ -102,7 +101,6 @@ TEST(Misc, update_atime_saves_mtime) {
}
TEST(Misc, update_atime_change_atime) {
SET_VERBOSITY_LEVEL(VERBOSITY_NAME(ERROR));
td::string name = "test_file";
td::unlink(name).ignore();
auto r_file = td::FileFd::open(name, td::FileFd::Read | td::FileFd::Flags::Create | td::FileFd::Flags::Truncate);

View File

@ -340,7 +340,6 @@ class BaselineKV {
};
TEST(DB, key_value) {
SET_VERBOSITY_LEVEL(VERBOSITY_NAME(ERROR));
std::vector<std::string> keys;
std::vector<std::string> values;
@ -517,7 +516,6 @@ TEST(DB, persistent_key_value) {
using KeyValue = BinlogKeyValue<ConcurrentBinlog>;
// using KeyValue = PersistentKeyValue;
// using KeyValue = SqliteKV;
SET_VERBOSITY_LEVEL(VERBOSITY_NAME(ERROR));
std::vector<std::string> keys;
std::vector<std::string> values;
CSlice path = "test_pmc";

View File

@ -140,7 +140,6 @@ TEST(Http, reader) {
return;
#endif
clear_thread_locals();
SET_VERBOSITY_LEVEL(VERBOSITY_NAME(ERROR));
auto start_mem = BufferAllocator::get_buffer_mem();
auto start_size = BufferAllocator::get_buffer_slice_size();
{

View File

@ -49,7 +49,6 @@
using namespace td;
TEST(Mtproto, GetHostByNameActor) {
SET_VERBOSITY_LEVEL(VERBOSITY_NAME(ERROR));
ConcurrentScheduler sched;
int threads_n = 1;
sched.init(threads_n);
@ -667,7 +666,6 @@ TEST(Mtproto, Grease) {
}
TEST(Mtproto, TlsTransport) {
SET_VERBOSITY_LEVEL(VERBOSITY_NAME(ERROR));
ConcurrentScheduler sched;
int threads_n = 1;
sched.init(threads_n);

View File

@ -1001,7 +1001,6 @@ void FakeSecretChatContext::on_read_message(int64, Promise<> promise) {
TEST(Secret, go) {
return;
SET_VERBOSITY_LEVEL(VERBOSITY_NAME(ERROR));
ConcurrentScheduler sched;
int threads_n = 0;
sched.init(threads_n);

View File

@ -828,7 +828,6 @@ class Tdclient_login final : public td::Test {
using Test::Test;
bool step() final {
if (!is_inited_) {
SET_VERBOSITY_LEVEL(VERBOSITY_NAME(DEBUG) + 2);
sched_.init(4);
sched_.create_actor_unsafe<LoginTestActor>(0, "LoginTestActor", &result_).release();
sched_.start();
@ -936,7 +935,7 @@ TEST(Client, Multi) {
TEST(Client, Manager) {
td::vector<td::thread> threads;
td::ClientManager client;
#if !TD_EVENTFD_UNSUPPORTED // Client must be used from a single thread if there is no EventFd
#if !TD_EVENTFD_UNSUPPORTED // Client must be used from a single thread if there is no EventFd
int threads_n = 4;
#else
int threads_n = 1;
@ -973,7 +972,7 @@ TEST(Client, Manager) {
}
}
#if !TD_EVENTFD_UNSUPPORTED // Client must be used from a single thread if there is no EventFd
#if !TD_EVENTFD_UNSUPPORTED // Client must be used from a single thread if there is no EventFd
TEST(Client, Close) {
std::atomic<bool> stop_send{false};
std::atomic<bool> can_stop_receive{false};