MCPcopy Create free account
hub / github.com/apache/impala / TEST

Function TEST

be/src/common/thread-debug-info-test.cc:30–51  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

28namespace impala {
29
30TEST(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
53TEST(ThreadDebugInfo, ThreadName) {
54 // Checks if we can store the thread name.

Callers

nothing calls this directly

Calls 13

PrintIdFunction · 0.85
GetThreadDebugInfoFunction · 0.85
CreateClass · 0.85
SetInstanceIdMethod · 0.80
SetQueryIdMethod · 0.80
GetThreadNameMethod · 0.80
substrMethod · 0.80
GetParentThreadNameMethod · 0.80
GetSystemThreadIdMethod · 0.80
GetQueryIdMethod · 0.45
SetThreadNameMethod · 0.45

Tested by

no test coverage detected