Skip to content

src/test/flutter_tester_device.dart !_gotProcessVmServiceUri.isCompleted asserts when running /dev/devicelab tests #145964

@Hixie

Description

@Hixie

STEPS TO REPRODUCE

  1. Add export FLUTTER_TOOL_ARGS=--enable-asserts to your .bashrc, or at least export it in your current shell.
  2. cd dev/devicelab from your flutter/flutter checkout.
  3. run flutter test.

EXPECTED RESULTS
Tests pass.

ACTUAL RESULTS
Many tests hit:

  'package:': Failed assertion: line 168 pos 16: '<optimized out>': is not true.
  [...]
  package:flutter_tools/src/test/flutter_tester_device.dart 168:16  FlutterTesterTestDevice.start.<fn>
  package:flutter_tools/src/test/flutter_tester_device.dart 359:39  FlutterTesterTestDevice._pipeStandardStreamsToConsole.<fn>
  [...]

The given line is in FlutterTesterTestDevice.start:

    _pipeStandardStreamsToConsole(
      process: _process!,
      reportVmServiceUri: (Uri detectedUri) async {
        assert(!_gotProcessVmServiceUri.isCompleted); // <-- THIS ASSERTS
        assert(debuggingOptions.hostVmServicePort == null ||
            debuggingOptions.hostVmServicePort == detectedUri.port);

I bisected this regression to #97683. cc @bkonyi

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work lista: tests"flutter test", flutter_test, or one of our testsc: tech-debtTechnical debt, code quality, testing, etc.team-toolOwned by Flutter Tool teamtool-still-validIssues that have been deemed still valid as part of the Flutter Tools issue cleanup initiative.triaged-toolTriaged by Flutter Tool team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions