diff options
author | 2015-01-14 19:53:31 -0800 | |
---|---|---|
committer | 2015-01-15 07:51:55 -0800 | |
commit | 369810a98e6394b6dd162f5349e38a1f597b3bc7 (patch) | |
tree | ec703b9fdfe57f039f833208f879d8c95b813137 /runtime/monitor_test.cc | |
parent | 1c1d40ab7fd856eac52e1a3be7ce60da3fc21fb5 (diff) |
ART: Allow scoped adjustments to log verbosity
Add ScopedLogSeverity to adjust the logging level.
Suppress warnings by default in gtests. Suppress errors in instances
where errors are expected.
Change-Id: If3ef865813e9505ab60bc90baed63ff11d90afbb
Diffstat (limited to 'runtime/monitor_test.cc')
-rw-r--r-- | runtime/monitor_test.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/runtime/monitor_test.cc b/runtime/monitor_test.cc index adc7848ae0..6d1e721bb6 100644 --- a/runtime/monitor_test.cc +++ b/runtime/monitor_test.cc @@ -356,6 +356,8 @@ static void CommonWaitSetup(MonitorTest* test, ClassLinker* class_linker, uint64 TEST_F(MonitorTest, CheckExceptionsWait1) { // Make the CreateTask wait 10ms, the UseTask wait 10ms. // => The use task will get the lock first and get to self == owner check. + // This will lead to OOM and monitor error messages in the log. + ScopedLogSeverity sls(LogSeverity::FATAL); CommonWaitSetup(this, class_linker_, 10, 50, false, false, 2, 50, true, "Monitor test thread pool 1"); } @@ -364,6 +366,8 @@ TEST_F(MonitorTest, CheckExceptionsWait1) { TEST_F(MonitorTest, CheckExceptionsWait2) { // Make the CreateTask wait 0ms, the UseTask wait 10ms. // => The create task will get the lock first and get to ms >= 0 + // This will lead to OOM and monitor error messages in the log. + ScopedLogSeverity sls(LogSeverity::FATAL); CommonWaitSetup(this, class_linker_, 0, -1, true, false, 10, 50, true, "Monitor test thread pool 2"); } @@ -373,6 +377,8 @@ TEST_F(MonitorTest, CheckExceptionsWait3) { // Make the CreateTask wait 0ms, then Wait for a long time. Make the InterruptTask wait 10ms, // after which it will interrupt the create task and then wait another 10ms. // => The create task will get to the interrupted-exception throw. + // This will lead to OOM and monitor error messages in the log. + ScopedLogSeverity sls(LogSeverity::FATAL); CommonWaitSetup(this, class_linker_, 0, 500, true, true, 10, 50, true, "Monitor test thread pool 3"); } |