Fix tests.
GitOrigin-RevId: c8fd96e6538d86eeff67bf23e1eb6ddd2fd97d1f
This commit is contained in:
parent
8fb6edab2f
commit
cb6456ce6d
@ -405,7 +405,7 @@ TEST(Actors, send_to_dead) {
|
||||
}
|
||||
|
||||
TEST(Actors, main_simple) {
|
||||
SET_VERBOSITY_LEVEL(VERBOSITY_NAME(DEBUG));
|
||||
SET_VERBOSITY_LEVEL(VERBOSITY_NAME(ERROR));
|
||||
|
||||
ConcurrentScheduler sched;
|
||||
int threads_n = 3;
|
||||
@ -420,7 +420,7 @@ TEST(Actors, main_simple) {
|
||||
}
|
||||
|
||||
TEST(Actors, main) {
|
||||
SET_VERBOSITY_LEVEL(VERBOSITY_NAME(DEBUG));
|
||||
SET_VERBOSITY_LEVEL(VERBOSITY_NAME(ERROR));
|
||||
|
||||
ConcurrentScheduler sched;
|
||||
int threads_n = 9;
|
||||
@ -448,7 +448,7 @@ class DoAfterStop : public Actor {
|
||||
};
|
||||
|
||||
TEST(Actors, do_after_stop) {
|
||||
SET_VERBOSITY_LEVEL(VERBOSITY_NAME(DEBUG));
|
||||
SET_VERBOSITY_LEVEL(VERBOSITY_NAME(ERROR));
|
||||
|
||||
ConcurrentScheduler sched;
|
||||
int threads_n = 0;
|
||||
|
@ -52,7 +52,7 @@ static FileLog file_log;
|
||||
static TsLog ts_log(&file_log);
|
||||
|
||||
void TestsRunner::init(string dir) {
|
||||
SET_VERBOSITY_LEVEL(VERBOSITY_NAME(WARNING));
|
||||
SET_VERBOSITY_LEVEL(VERBOSITY_NAME(ERROR));
|
||||
chdir(dir).ensure();
|
||||
LOG(WARNING) << "Redirect log into " << tag("file", dir + TD_DIR_SLASH + "log.txt");
|
||||
if (file_log.init("log.txt", std::numeric_limits<int64>::max())) {
|
||||
|
@ -234,7 +234,7 @@ class BaselineKV {
|
||||
};
|
||||
|
||||
TEST(DB, key_value) {
|
||||
SET_VERBOSITY_LEVEL(VERBOSITY_NAME(INFO));
|
||||
SET_VERBOSITY_LEVEL(VERBOSITY_NAME(ERROR));
|
||||
std::vector<std::string> keys;
|
||||
std::vector<std::string> values;
|
||||
|
||||
@ -409,7 +409,7 @@ TEST(DB, persistent_key_value) {
|
||||
using KeyValue = BinlogKeyValue<ConcurrentBinlog>;
|
||||
// using KeyValue = PersistentKeyValue;
|
||||
// using KeyValue = SqliteKV;
|
||||
SET_VERBOSITY_LEVEL(VERBOSITY_NAME(WARNING));
|
||||
SET_VERBOSITY_LEVEL(VERBOSITY_NAME(ERROR));
|
||||
std::vector<std::string> keys;
|
||||
std::vector<std::string> values;
|
||||
CSlice name = "test_pmc";
|
||||
|
@ -129,7 +129,7 @@ TEST(Http, reader) {
|
||||
return;
|
||||
#endif
|
||||
clear_thread_locals();
|
||||
SET_VERBOSITY_LEVEL(VERBOSITY_NAME(INFO));
|
||||
SET_VERBOSITY_LEVEL(VERBOSITY_NAME(ERROR));
|
||||
auto start_mem = BufferAllocator::get_buffer_mem();
|
||||
{
|
||||
auto input_writer = ChainBufferWriter::create_empty();
|
||||
|
@ -16,6 +16,7 @@
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
// TODO port OptionsParser to Windows
|
||||
SET_VERBOSITY_LEVEL(VERBOSITY_NAME(ERROR));
|
||||
for (int i = 1; i < argc; i++) {
|
||||
if (!std::strcmp(argv[i], "--filter")) {
|
||||
CHECK(i + 1 < argc);
|
||||
|
@ -39,9 +39,9 @@ TEST(MessageEntities, mention) {
|
||||
check_mention("@abcdefghijklmnopqrstuvwxyz123456", {"@abcdefghijklmnopqrstuvwxyz123456"});
|
||||
check_mention("@abcdefghijklmnopqrstuvwxyz1234567", {});
|
||||
check_mention("нет@mention", {});
|
||||
check_mention("@ya @gif @wiki @vid @bing @pic @bold @imdb @coub @like @vote @giff @cap ya cap @y @yar @bingg @bin",
|
||||
{"@ya", "@gif", "@wiki", "@vid", "@bing", "@pic", "@bold", "@imdb", "@coub", "@like", "@vote", "@giff",
|
||||
"@cap", "@bingg"});
|
||||
check_mention(
|
||||
"@ya @gif @wiki @vid @bing @pic @bold @imdb @coub @like @vote @giff @cap ya cap @y @yar @bingg @bin",
|
||||
{"@ya", "@gif", "@wiki", "@vid", "@bing", "@pic", "@bold", "@imdb", "@coub", "@like", "@vote", "@bingg"});
|
||||
};
|
||||
|
||||
static void check_bot_command(string str, std::vector<string> expected) {
|
||||
|
@ -127,7 +127,7 @@ class TestPingActor : public Actor {
|
||||
return stop();
|
||||
}
|
||||
if (ping_connection_->was_pong()) {
|
||||
LOG(ERROR) << "GOT PONG";
|
||||
LOG(INFO) << "GOT PONG";
|
||||
return stop();
|
||||
}
|
||||
}
|
||||
|
@ -88,8 +88,7 @@ TEST(StringCleaning, strip_empty_characters) {
|
||||
check_strip_empty_characters(empty, 1000000, "");
|
||||
check_strip_empty_characters(empty + "a", 1000000, empty + "a");
|
||||
check_strip_empty_characters(spaces + empty + spaces + "abc" + spaces, 1000000, empty + spaces_replace + "abc");
|
||||
check_strip_empty_characters(spaces + spaces + empty + spaces + spaces + empty + empty, 1000000,
|
||||
empty + spaces_replace + spaces_replace + empty + empty);
|
||||
check_strip_empty_characters(spaces + spaces + empty + spaces + spaces + empty + empty, 1000000, "");
|
||||
check_strip_empty_characters("\r\r\r\r\r\r\r", 1000000, "");
|
||||
check_strip_empty_characters("\r\n\r\n\r\n\r\n\r\n\r\n\r", 1000000, "");
|
||||
check_strip_empty_characters(Slice(" \t\r\n\0\va\v\0\n\r\t ").str(), 1000000, "a");
|
||||
|
Reference in New Issue
Block a user