aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Mayer <fmayer@google.com>2019-11-11 14:26:55 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2019-11-11 14:26:55 +0000
commit7980e5ea3e3474de2c7476b995c3842857d2f749 (patch)
tree785ac8de7499ca7ccd307181dd7577b1753abf0a
parent27521bd0f067af6d75d4b80478d46fcb17314b33 (diff)
parent9ae3d74c3e8cad02fc2921371263808b82d442b9 (diff)
downloadperfetto-7980e5ea3e3474de2c7476b995c3842857d2f749.tar.gz
Merge "Wait for app to stop in java hprof CTS."
-rw-r--r--test/cts/heapprofd_java_test_cts.cc9
1 files changed, 3 insertions, 6 deletions
diff --git a/test/cts/heapprofd_java_test_cts.cc b/test/cts/heapprofd_java_test_cts.cc
index a1a610855..8ac37604d 100644
--- a/test/cts/heapprofd_java_test_cts.cc
+++ b/test/cts/heapprofd_java_test_cts.cc
@@ -52,7 +52,7 @@ std::vector<protos::TracePacket> ProfileRuntime(std::string app_name) {
helper.WaitForConsumerConnect();
TraceConfig trace_config;
- trace_config.add_buffers()->set_size_kb(10 * 1024);
+ trace_config.add_buffers()->set_size_kb(20 * 1024);
trace_config.set_duration_ms(6000);
auto* ds_config = trace_config.add_data_sources()->mutable_config();
@@ -68,7 +68,8 @@ std::vector<protos::TracePacket> ProfileRuntime(std::string app_name) {
helper.WaitForTracingDisabled(10000 /*ms*/);
helper.ReadData();
helper.WaitForReadData();
-
+ StopApp(app_name, "new.app.stopped", &task_runner);
+ task_runner.RunUntilCheckpoint("new.app.stopped", 1000 /*ms*/);
return helper.trace();
}
@@ -99,14 +100,12 @@ TEST(HeapprofdJavaCtsTest, DebuggableAppRuntime) {
std::string app_name = "android.perfetto.cts.app.debuggable";
const auto& packets = ProfileRuntime(app_name);
AssertGraphPresent(packets);
- StopApp(app_name);
}
TEST(HeapprofdJavaCtsTest, ProfileableAppRuntime) {
std::string app_name = "android.perfetto.cts.app.profileable";
const auto& packets = ProfileRuntime(app_name);
AssertGraphPresent(packets);
- StopApp(app_name);
}
TEST(HeapprofdJavaCtsTest, ReleaseAppRuntime) {
@@ -117,8 +116,6 @@ TEST(HeapprofdJavaCtsTest, ReleaseAppRuntime) {
AssertGraphPresent(packets);
else
AssertNoProfileContents(packets);
-
- StopApp(app_name);
}
} // namespace