| 28 | namespace impala { |
| 29 | |
| 30 | TEST(ThreadDebugInfo, Ids) { |
| 31 | // This test checks if SetInstanceId() stores the |
| 32 | // string representation of a TUniqueId correctly. |
| 33 | ThreadDebugInfo thread_debug_info; |
| 34 | TUniqueId instance_id; |
| 35 | instance_id.hi = 123; |
| 36 | instance_id.lo = 456; |
| 37 | thread_debug_info.SetInstanceId(instance_id); |
| 38 | string instance_id_str = PrintId(instance_id); |
| 39 | |
| 40 | EXPECT_EQ(instance_id, thread_debug_info.GetInstanceId()); |
| 41 | EXPECT_EQ(instance_id_str, PrintId(thread_debug_info.GetInstanceId())); |
| 42 | |
| 43 | TUniqueId query_id; |
| 44 | query_id.hi = 1234; |
| 45 | query_id.lo = 4567; |
| 46 | thread_debug_info.SetQueryId(query_id); |
| 47 | string query_id_str = PrintId(query_id); |
| 48 | |
| 49 | EXPECT_EQ(query_id, thread_debug_info.GetQueryId()); |
| 50 | EXPECT_EQ(query_id_str, PrintId(thread_debug_info.GetQueryId())); |
| 51 | } |
| 52 | |
| 53 | TEST(ThreadDebugInfo, ThreadName) { |
| 54 | // Checks if we can store the thread name. |
nothing calls this directly
no test coverage detected