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

Function TEST

be/src/util/minidump-test.cc:34–56  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

32 bool succeeded);
33
34TEST(Minidump, DumpCallback) {
35 testing::internal::CaptureStdout();
36 testing::internal::CaptureStderr();
37
38 google_breakpad::MinidumpDescriptor descriptor("/tmp/arbitrary/path");
39 descriptor.UpdatePath();
40 DumpCallback(descriptor, nullptr, true);
41
42 std::string stdout = testing::internal::GetCapturedStdout();
43 std::string stderr = testing::internal::GetCapturedStderr();
44 boost::regex wrote_minidump("Wrote minidump to /tmp/arbitrary/path/.*\\.dmp");
45
46 for (std::string output : {stdout, stderr}) {
47 std::vector<std::string> lines;
48 boost::split(lines, output, boost::is_any_of("\n\r"), boost::token_compress_on);
49 EXPECT_EQ(3, lines.size()) << output;
50 EXPECT_EQ("Minidump with no thread info available.", lines[0])
51 << lines[0] << "\nOutput:\n" << output;
52 EXPECT_TRUE(boost::regex_match(lines[1], wrote_minidump))
53 << lines[1] << "\nOutput:\n" << output;
54 EXPECT_EQ("", lines[2]) << output;
55 }
56}
57
58TEST(Minidump, DumpCallbackWithThread) {
59 testing::internal::CaptureStdout();

Callers

nothing calls this directly

Calls 4

SetQueryIdMethod · 0.80
SetInstanceIdMethod · 0.80
DumpCallbackFunction · 0.70
sizeMethod · 0.45

Tested by

no test coverage detected