Skip to content
This repository has been archived by the owner on Feb 25, 2025. It is now read-only.

Commit

Permalink
Remove flaky check from observatory/tracing_test.dart (#51320)
Browse files Browse the repository at this point in the history
  • Loading branch information
zanderso authored Mar 11, 2024
1 parent 5bdc0dc commit 6745955
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions testing/dart/observatory/tracing_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Future<void> _testChromeFormatTrace(vms.VmService vmService) async {

int saveLayerRecordCount = 0;
int saveLayerCount = 0;
int flowEventCount = 0;
// int flowEventCount = 0;
for (final vms.TimelineEvent event in timeline.traceEvents!) {
final Map<String, dynamic> json = event.json!;
if (json['ph'] == 'B') {
Expand All @@ -29,13 +29,15 @@ Future<void> _testChromeFormatTrace(vms.VmService vmService) async {
if (json['name'] == 'Canvas::saveLayer') {
saveLayerCount += 1;
}
} else if (json['ph'] == 's' || json['ph'] == 't' || json['ph'] == 'f') {
flowEventCount += 1;
}
// else if (json['ph'] == 's' || json['ph'] == 't' || json['ph'] == 'f') {
// flowEventCount += 1;
// }
}
expect(saveLayerRecordCount, 3);
expect(saveLayerCount, impellerEnabled ? 2 : 3);
expect(flowEventCount, 5);
// TODO(derekxu16): Deflake https://github.com/flutter/flutter/issues/144394
// expect(flowEventCount, 5);
}

Future<void> _testPerfettoFormatTrace(vms.VmService vmService) async {
Expand All @@ -48,7 +50,7 @@ Future<void> _testPerfettoFormatTrace(vms.VmService vmService) async {

int saveLayerRecordCount = 0;
int saveLayerCount = 0;
int flowIdCount = 0;
// int flowIdCount = 0;
for (final TrackEvent event in events) {
if (event.type == TrackEvent_Type.TYPE_SLICE_BEGIN) {
if (event.name == 'ui.Canvas::saveLayer (Recorded)') {
Expand All @@ -57,12 +59,13 @@ Future<void> _testPerfettoFormatTrace(vms.VmService vmService) async {
if (event.name == 'Canvas::saveLayer') {
saveLayerCount += 1;
}
flowIdCount += event.flowIds.length;
// flowIdCount += event.flowIds.length;
}
}
expect(saveLayerRecordCount, 3);
expect(saveLayerCount, impellerEnabled ? 2 : 3);
expect(flowIdCount, 5);
// TODO(derekxu16): Deflake https://github.com/flutter/flutter/issues/144394
// expect(flowIdCount, 5);
}

void main() {
Expand Down

0 comments on commit 6745955

Please sign in to comment.