Skip to content

fuchsia_tester --coverage hangs on dartfmt_extras_tests #19486

@garymm

Description

@garymm

Steps to reproduce:

  1. Check out fuchsia with layer set to topaz.
  2. patch replace third_party/dart-pkg/git/flutter/packages/flutter_tools/bin/fuchsia_tester.dart with the copy from upstream flutter: curl https://raw.githubusercontent.com/flutter/flutter/master/packages/flutter_tools/bin/fuchsia_tester.dart -o third_party/dart-pkg/git/flutter/packages/flutter_tools/bin/fuchsia_tester.dart. This won't be needed once the version of flutter in fuchsia gets updated.
  3. fx clean-build x64
  4. out/x64/host_x64/dart-tools/fuchsia_tester --packages=$PWD/out/x64/dartlang/gen/topaz/tools/dartfmt_extras/dartfmt_extras_tests_library.packages --shell=$PWD/out/x64/host_x64/flutter_tester --test-directory=$PWD/topaz/tools/dartfmt_extras/test --coverage

Expected result:
Test runs to completion and generates coverage data.

Observed result:
Test hangs for 2 minutes, then an exception is raised and the process stays stuck.

00:00 +0: loading /usr/local/google/home/garymm/fuchsia/topaz/tools/dartfmt_extras/test/directives_test.dart                        S
hell: Do not know weight for: TeXGyreSchola (BoldItalic)
Shell: Do not know weight for: TeXGyreSchola (BoldItalic)
02:01 +2: ... Double quotes should be fixed correctly.                                                                              u
nhandled error during test:
/usr/local/google/home/garymm/fuchsia/topaz/tools/dartfmt_extras/test/directives_test.dart
Exception: Timed out while collecting coverage.
#0      CoverageCollector.collectCoverage.<anonymous closure> (package:flutter_tools/src/test/coverage_collector.dart:64)
#1      StackZoneSpecification._run (package:stack_trace/src/stack_zone_specification.dart:209)
#2      StackZoneSpecification._registerCallback.<anonymous closure> (package:stack_trace/src/stack_zone_specification.dart:119)
#3      _rootRun (dart:async/zone.dart:1122)
#4      _CustomZone.run (dart:async/zone.dart:1023)
#5      Future.timeout.<anonymous closure> (dart:async/future_impl.dart:731)
#6      StackZoneSpecification._run (package:stack_trace/src/stack_zone_specification.dart:209)
#7      StackZoneSpecification._registerCallback.<anonymous closure> (package:stack_trace/src/stack_zone_specification.dart:119)
#8      _rootRun (dart:async/zone.dart:1122)
#9      _CustomZone.run (dart:async/zone.dart:1023)
#10     _CustomZone.runGuarded (dart:async/zone.dart:925)
#11     _CustomZone.bindCallbackGuarded.<anonymous closure> (dart:async/zone.dart:965)
#12     StackZoneSpecification._run (package:stack_trace/src/stack_zone_specification.dart:209)
#13     StackZoneSpecification._registerCallback.<anonymous closure> (package:stack_trace/src/stack_zone_specification.dart:119)
#14     _rootRun (dart:async/zone.dart:1126)
#15     _CustomZone.run (dart:async/zone.dart:1023)
#16     _CustomZone.bindCallback.<anonymous closure> (dart:async/zone.dart:949)
#17     Timer._createTimer.<anonymous closure> (dart:async-patch/dart:async/timer_patch.dart:21)
#18     _Timer._runTimers (dart:isolate-patch/dart:isolate/timer_impl.dart:382)
#19     _Timer._handleMessage (dart:isolate-patch/dart:isolate/timer_impl.dart:416)
#20     _RawReceivePortImpl._handleMessage (dart:isolate-patch/dart:isolate/isolate_patch.dart:165)

So there are really 2 issues here:

  1. This particular test triggers a timeout during coverage collection. Not sure if the problem is in the flutter coverage collector or in the code under test.
  2. Once the timeout is triggered, the fuchsia_tester process hangs rather than exits cleanly.

CC @yyoon @cbracken @tvolkert

Metadata

Metadata

Assignees

Labels

a: tests"flutter test", flutter_test, or one of our testsc: crashStack traces logged to the consolecustomer: fuchsia

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions