Skip to content

Commit 3810f5f

Browse files
committed
Threads-Log: Remove utest for reload log configs.
1 parent bf95fdf commit 3810f5f

File tree

2 files changed

+1
-64
lines changed

2 files changed

+1
-64
lines changed

trunk/src/app/srs_app_threads.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -380,7 +380,7 @@ std::string SrsAsyncLogManager::desc()
380380
}
381381

382382
static char buf[128];
383-
snprintf(buf, sizeof(buf), ", files=%d, queue=%d, max=%d", (int)writers_.size(), nn_logs, max_logs);
383+
snprintf(buf, sizeof(buf), ", files=%d, queue=%d/%d", (int)writers_.size(), nn_logs, max_logs);
384384
return buf;
385385
}
386386

trunk/src/utest/srs_utest_reload.cpp

-63
Original file line numberDiff line numberDiff line change
@@ -372,69 +372,6 @@ VOID TEST(ConfigReloadTest, ReloadPid)
372372
handler.reset();
373373
}
374374

375-
VOID TEST(ConfigReloadTest, ReloadLogTank)
376-
{
377-
MockReloadHandler handler;
378-
MockSrsReloadConfig conf;
379-
380-
conf.subscribe(&handler);
381-
EXPECT_TRUE(ERROR_SUCCESS == conf.parse(_MIN_OK_CONF"srs_log_tank console;"));
382-
EXPECT_TRUE(ERROR_SUCCESS == conf.do_reload(_MIN_OK_CONF"srs_log_tank console;"));
383-
EXPECT_TRUE(handler.all_false());
384-
handler.reset();
385-
386-
EXPECT_TRUE(ERROR_SUCCESS == conf.do_reload(_MIN_OK_CONF"srs_log_tank file;"));
387-
EXPECT_TRUE(handler.log_tank_reloaded);
388-
EXPECT_EQ(1, handler.count_true());
389-
handler.reset();
390-
391-
EXPECT_TRUE(ERROR_SUCCESS == conf.do_reload(_MIN_OK_CONF"srs_log_tank console;"));
392-
EXPECT_EQ(1, handler.count_true());
393-
handler.reset();
394-
}
395-
396-
VOID TEST(ConfigReloadTest, ReloadLogLevel)
397-
{
398-
MockReloadHandler handler;
399-
MockSrsReloadConfig conf;
400-
401-
conf.subscribe(&handler);
402-
EXPECT_TRUE(ERROR_SUCCESS == conf.parse(_MIN_OK_CONF"srs_log_level trace;"));
403-
EXPECT_TRUE(ERROR_SUCCESS == conf.do_reload(_MIN_OK_CONF"srs_log_level trace;"));
404-
EXPECT_TRUE(handler.all_false());
405-
handler.reset();
406-
407-
EXPECT_TRUE(ERROR_SUCCESS == conf.do_reload(_MIN_OK_CONF"srs_log_level warn;"));
408-
EXPECT_TRUE(handler.log_level_reloaded);
409-
EXPECT_EQ(1, handler.count_true());
410-
handler.reset();
411-
412-
EXPECT_TRUE(ERROR_SUCCESS == conf.do_reload(_MIN_OK_CONF"srs_log_level trace;"));
413-
EXPECT_EQ(1, handler.count_true());
414-
handler.reset();
415-
}
416-
417-
VOID TEST(ConfigReloadTest, ReloadLogFile)
418-
{
419-
MockReloadHandler handler;
420-
MockSrsReloadConfig conf;
421-
422-
conf.subscribe(&handler);
423-
EXPECT_TRUE(ERROR_SUCCESS == conf.parse(_MIN_OK_CONF"srs_log_file srs.log;"));
424-
EXPECT_TRUE(ERROR_SUCCESS == conf.do_reload(_MIN_OK_CONF"srs_log_file srs.log;"));
425-
EXPECT_TRUE(handler.all_false());
426-
handler.reset();
427-
428-
EXPECT_TRUE(ERROR_SUCCESS == conf.do_reload(_MIN_OK_CONF"srs_log_file srs1.log;"));
429-
EXPECT_TRUE(handler.log_file_reloaded);
430-
EXPECT_EQ(1, handler.count_true());
431-
handler.reset();
432-
433-
EXPECT_TRUE(ERROR_SUCCESS == conf.do_reload(_MIN_OK_CONF"srs_log_file srs.log;"));
434-
EXPECT_EQ(1, handler.count_true());
435-
handler.reset();
436-
}
437-
438375
VOID TEST(ConfigReloadTest, ReloadPithyPrint)
439376
{
440377
MockReloadHandler handler;

0 commit comments

Comments
 (0)