diff options
author | 2022-10-26 15:00:29 +0100 | |
---|---|---|
committer | 2022-10-27 13:35:43 +0000 | |
commit | 6a109ac60aa60b2bad2cc0f4404b6166e53b9e2a (patch) | |
tree | bfef67b3755c7c29c23ba4fbccdcddef97c7b7ce | |
parent | 720dcbc15b09f7be5718eb77245f68d04aeea3c2 (diff) |
Derive MessageQueueTest from CommonRuntimeTest
Ensure we have Runtime::Current()
Bug: 254271810
Test: run gtests in loop
Change-Id: I4597d05696b01727e94a5f084db29f78e10b628c
-rw-r--r-- | runtime/base/message_queue_test.cc | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/runtime/base/message_queue_test.cc b/runtime/base/message_queue_test.cc index 039e96dace..09dbc3271d 100644 --- a/runtime/base/message_queue_test.cc +++ b/runtime/base/message_queue_test.cc @@ -18,12 +18,18 @@ #include <thread> -#include "base/common_art_test.h" +#include "common_runtime_test.h" #include "thread-current-inl.h" +#include "runtime.h" namespace art { -class MessageQueueTest : public CommonArtTest {}; +class MessageQueueTest : public CommonRuntimeTest { + protected: + MessageQueueTest() { + this->use_boot_image_ = true; // Make the Runtime creation cheaper. + } +}; namespace { @@ -81,6 +87,8 @@ TEST_F(MessageQueueTest, TestTimeout) { } TEST_F(MessageQueueTest, TwoWayMessaging) { + CHECK(Runtime::Current() != nullptr); // Runtime is needed by Mutex. + TestMessageQueue queue1; TestMessageQueue queue2; |