diff options
author | Florian Mayer <fmayer@google.com> | 2019-11-11 14:26:55 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2019-11-11 14:26:55 +0000 |
commit | 7980e5ea3e3474de2c7476b995c3842857d2f749 (patch) | |
tree | 785ac8de7499ca7ccd307181dd7577b1753abf0a | |
parent | 27521bd0f067af6d75d4b80478d46fcb17314b33 (diff) | |
parent | 9ae3d74c3e8cad02fc2921371263808b82d442b9 (diff) | |
download | perfetto-7980e5ea3e3474de2c7476b995c3842857d2f749.tar.gz |
Merge "Wait for app to stop in java hprof CTS."
-rw-r--r-- | test/cts/heapprofd_java_test_cts.cc | 9 |
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 |