Skip to content

Commit

Permalink
Proper setup of PerfettoTracedProcess in PerfettoIntegrationTest and …
Browse files Browse the repository at this point in the history
…TracingConsumerTest.

Without it running whole PerfettoIntegrationTest suite will end with a crash at
the second test, due to invalid task runner in PerfettoTracedProcess and
TracingConsumerTest will fail in LargeDataSize and PrivacyFilterConfigInJson tests due
to invalid data sources in PerfettoTracedProcess

Change-Id: I952afa3226d085916fae047158c1a62b0ac14c13
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1658472
Commit-Queue: Michal Pichlinski <mpichlinski@opera.com>
Reviewed-by: oysteine <oysteine@chromium.org>
Cr-Commit-Position: refs/heads/master@{#669138}
  • Loading branch information
Michał Pichliński authored and Commit Bot committed Jun 14, 2019
1 parent 541d9f5 commit 9f5b2e2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions services/tracing/perfetto/consumer_host_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,7 @@ class TracingConsumerTest : public testing::Test,
public:
void SetUp() override {
PerfettoTracedProcess::ResetTaskRunnerForTesting();
PerfettoTracedProcess::Get()->ClearDataSourcesForTesting();
threaded_service_ = std::make_unique<ThreadedPerfettoService>();

matching_packet_count_ = 0;
Expand Down
1 change: 1 addition & 0 deletions services/tracing/perfetto/perfetto_integration_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ const char kPerfettoProducerName[] = "org.chromium.perfetto_producer.123";
class PerfettoIntegrationTest : public testing::Test {
public:
void SetUp() override {
PerfettoTracedProcess::Get()->ResetTaskRunnerForTesting();
PerfettoTracedProcess::Get()->ClearDataSourcesForTesting();
data_source_ =
std::make_unique<TestDataSource>(kPerfettoTestDataSourceName, 0);
Expand Down

0 comments on commit 9f5b2e2

Please sign in to comment.