Content-Length: 305756 | pFad | https://github.com/flutter/flutter/issues/135673

E1 `flutter test` can't run multiple integration test files on desktop · Issue #135673 · flutter/flutter · GitHub
Skip to content

flutter test can't run multiple integration test files on desktop #135673

@stuartmorgan-g

Description

@stuartmorgan-g

(This may well apply to the other desktop platform as well; I haven't tried them, but a lot of the flutter code to run desktop apps is similar across platforms.)

STR:

  1. Check out flutter/packages and cd to packages/video_player/video_player/example
  2. Run flutter test -d macos integration_test/controller_swap_test.dart
  3. Run flutter test -d macos integration_test/video_player_test.dart
  4. Run flutter test -d macos integration_test/

Steps 2 and 3 work fine. Step 4 however, which should have essentially the same effect as 2+3 (those are the two test files in that directory), runs one set of tests—the app visibly launches, then quits—then when it tries to run the second launches the app but doesn't run tests, and instead logs:

  TestDeviceException(Unable to start the app on the device.)
  package:flutter_tools/src/test/integration_test_device.dart 63:7  IntegrationTestTestDevice.start
  
  Bad state: Cannot add new events after calling close
  dart:async/broadcast_stream_controller.dart 243:24  _BroadcastStreamController.add
  dart:async/zone.dart 1407:47                        _rootRunUnary
  dart:async/zone.dart 1308:19                        _CustomZone.runUnary
  dart:async/zone.dart 1217:7                         _CustomZone.runUnaryGuarded
  dart:async/stream_impl.dart 339:11                  _BufferingStreamSubscription._sendData
  dart:async/stream_impl.dart 271:7                   _BufferingStreamSubscription._add
  dart:async/stream_controller.dart 784:19            _SyncStreamControllerDispatch._sendData
  dart:async/stream_controller.dart 658:7             _StreamController._add
  dart:async/stream_controller.dart 606:5             _StreamController.add
  dart:io-patch/socket_patch.dart 2447:41             _Socket._onData
  dart:async/zone.dart 1415:13                        _rootRunUnary
  dart:async/zone.dart 1308:19                        _CustomZone.runUnary
  dart:async/zone.dart 1217:7                         _CustomZone.runUnaryGuarded
  dart:async/stream_impl.dart 339:11                  _BufferingStreamSubscription._sendData
  dart:async/stream_impl.dart 271:7                   _BufferingStreamSubscription._add
  dart:async/stream_controller.dart 784:19            _SyncStreamControllerDispatch._sendData
  dart:async/stream_controller.dart 658:7             _StreamController._add
  dart:async/stream_controller.dart 606:5             _StreamController.add
  dart:io-patch/socket_patch.dart 1936:33             new _RawSocket.<fn>
  dart:io-patch/socket_patch.dart 1379:14             _NativeSocket.issueReadEvent.issue
  dart:async/schedule_microtask.dart 40:21            _microtaskLoop
  dart:async/schedule_microtask.dart 49:5             _startMicrotaskLoop
  dart:isolate-patch/isolate_patch.dart 118:13        _runPendingImmediateCallback
  dart:isolate-patch/isolate_patch.dart 185:5         _RawReceivePort._handleMessage

and then sits there doing nothing with the app still open.

It looks like something about the flutter test logic for desktop is trying to re-use a stream when it does subsequent launches.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work lista: desktopRunning on desktopa: tests"flutter test", flutter_test, or one of our testsplatform-linuxBuilding on or for Linux specificallyplatform-macBuilding on or for macOS specificallyteam-toolOwned by Flutter Tool teamtoolAffects the "flutter" command-line tool. See also t: labels.tool-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









      ApplySandwichStrip

      pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


      --- a PPN by Garber Painting Akron. With Image Size Reduction included!

      Fetched URL: https://github.com/flutter/flutter/issues/135673

      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy