-
Notifications
You must be signed in to change notification settings - Fork 30.2k
Flutter packages: Dart Tests: flutter_image tests fails #135051
Copy link
Copy link
Closed as not planned
Labels
P3Issues that are less important to the Flutter projectIssues that are less important to the Flutter projectfrom: manual-qaIssue caught from manual QA processIssue caught from manual QA processteam-ecosystemOwned by Ecosystem teamOwned by Ecosystem team
Description
Is there an existing issue for this?
- I have searched the existing issues
- I have read the guide to filing a bug
Steps to reproduce
git clone GitHub - flutter/packages: A collection of useful packages maintained by the Flutter team
cd packages
Install Flutter master version
cd packages/flutter_image
Flutter pub get
Run the test
Alternatively you can run test inside VSCode in the Test Navigator
Expected results
Running all tests should succeed
Actual results
Code sample
Code sample
[Paste your code here]Screenshots or Video
Screenshots / Video demonstration
[Upload media here]
Logs
Logs
00:00 +0: loading /Users/hairon/Documents/packages/packages/flutter_image/test/network_test.dart 00:01 +0: loading /Users/hairon/Documents/packages/packages/flutter_image/test/network_test.dart 00:02 +0: loading /Users/hairon/Documents/packages/packages/flutter_image/test/network_test.dart 00:03 +0: loading /Users/hairon/Documents/packages/packages/flutter_image/test/network_test.dart 00:03 +0: NetworkImageWithRetry succeeds loads image from network 00:04 +0: NetworkImageWithRetry succeeds loads image from network 00:05 +0: NetworkImageWithRetry succeeds loads image from network 00:06 +0: NetworkImageWithRetry succeeds loads image from network 00:07 +0: NetworkImageWithRetry succeeds loads image from network 00:08 +0: NetworkImageWithRetry succeeds loads image from network 00:09 +0: NetworkImageWithRetry succeeds loads image from network 00:10 +0: NetworkImageWithRetry succeeds loads image from network 00:11 +0: NetworkImageWithRetry succeeds loads image from network 00:12 +0: NetworkImageWithRetry succeeds loads image from network 00:13 +0: NetworkImageWithRetry succeeds loads image from network 00:14 +0: NetworkImageWithRetry succeeds loads image from network 00:15 +0: NetworkImageWithRetry succeeds loads image from network 00:16 +0: NetworkImageWithRetry succeeds loads image from network 00:17 +0: NetworkImageWithRetry succeeds loads image from network 00:18 +0: NetworkImageWithRetry succeeds loads image from network 00:19 +0: NetworkImageWithRetry succeeds loads image from network 00:20 +0: NetworkImageWithRetry succeeds loads image from network 00:21 +0: NetworkImageWithRetry succeeds loads image from network 00:22 +0: NetworkImageWithRetry succeeds loads image from network 00:23 +0: NetworkImageWithRetry succeeds loads image from network 00:24 +0: NetworkImageWithRetry succeeds loads image from network 00:25 +0: NetworkImageWithRetry succeeds loads image from network 00:26 +0: NetworkImageWithRetry succeeds loads image from network 00:27 +0: NetworkImageWithRetry succeeds loads image from network 00:28 +0: NetworkImageWithRetry succeeds loads image from network 00:29 +0: NetworkImageWithRetry succeeds loads image from network 00:30 +0: NetworkImageWithRetry succeeds loads image from network 00:31 +0: NetworkImageWithRetry succeeds loads image from network 00:32 +0: NetworkImageWithRetry succeeds loads image from network 00:33 +0: NetworkImageWithRetry succeeds loads image from network 00:33 +0 -1: NetworkImageWithRetry succeeds loads image from network [E]
TimeoutException after 0:00:30.000000: Test timed out after 30 seconds. See [test | Dart Package](https://pub.dev/packages/test#timeouts)
dart:isolate _RawReceivePort._handleMessage
To run this test again: /Users/hairon/fvm/versions/master/bin/cache/dart-sdk/bin/dart test /Users/hairon/Documents/packages/packages/flutter_image/test/network_test.dart -p vm --plain-name 'NetworkImageWithRetry succeeds loads image from network'
00:33 +0 -1: NetworkImageWithRetry succeeds loads image from network with an extra header 00:34 +0 -1: NetworkImageWithRetry succeeds loads image from network with an extra header 00:34 +0 -1: NetworkImageWithRetry succeeds loads image from network [E]
══╡ EXCEPTION CAUGHT BY IMAGE RESOURCE SERVICE ╞═════════════════
The following TestFailure was thrown resolving a single-frame
image stream:
══╡ EXCEPTION CAUGHT BY PACKAGE:FLUTTER_IMAGE ╞══════════════════
The following FetchFailure was thrown NetworkImageWithRetry
failed to load http://localhost:11111/immediate_success.png:
FetchFailure(
attemptCount: 6
httpStatusCode: null
totalDuration: 0:00:31.111080
originalException: SocketException: Connection refused (OS
Error: Connection refused, errno = 61), address = localhost, port
= 50659
)
═════════════════════════════════════════════════════════════════
When the exception was thrown, this was the stack:
#0 fail (package:matcher/src/expect/expect.dart:149:31)
#1 main.<anonymous closure>.<anonymous closure>.<anonymous closure>.<anonymous closure> (file:///Users/hairon/Documents/packages/packages/flutter_image/test/network_test.dart:26:11)
#2 NetworkImageWithRetry._loadWithRetry (package:flutter_image/network.dart:214:28)
<asynchronous suspension>
#3 ImageStreamCompleter.setImage (package:flutter/src/painting/image_stream.dart:698:3)
<asynchronous suspension>
Image provider:
NetworkImageWithRetry("[http://localhost:11111/immediate_success.png",](http://localhost:11111/immediate_success.png%22,)
scale: 1.0)
Image key:
NetworkImageWithRetry("[http://localhost:11111/immediate_success.png",](http://localhost:11111/immediate_success.png%22,)
scale: 1.0)
═════════════════════════════════════════════════════════════════
package:matcher fail
test/network_test.dart 26:11 main.<fn>.<fn>.<fn>.<fn>
package:flutter/src/foundation/assertions.dart 1185:14 FlutterError.reportError
package:flutter/src/painting/image_stream.dart 802:20 ImageStreamCompleter.reportError
package:flutter/src/painting/image_stream.dart 863:7 new OneFrameImageStreamCompleter.<fn>
===== asynchronous gap ===========================
dart:async Future.then
package:flutter/src/painting/image_stream.dart 862:11 new OneFrameImageStreamCompleter
package:flutter_image/network.dart 109:12 NetworkImageWithRetry.loadBuffer
test/network_test.dart 163:50 assertThatImageLoadingSucceeds
test/network_test.dart 39:9 main.<fn>.<fn>.<fn>
01:03 +0 -2: NetworkImageWithRetry succeeds loads image from network with an extra header [E]
TimeoutException after 0:00:30.000000: Test timed out after 30 seconds. See [test | Dart Package](https://pub.dev/packages/test#timeouts)
dart:isolate _RawReceivePort._handleMessage
To run this test again: /Users/hairon/fvm/versions/master/bin/cache/dart-sdk/bin/dart test /Users/hairon/Documents/packages/packages/flutter_image/test/network_test.dart -p vm --plain-name 'NetworkImageWithRetry succeeds loads image from network with an extra header'
01:03 +0 -2: NetworkImageWithRetry succeeds succeeds on successful retry 01:03 +0 -3: NetworkImageWithRetry succeeds succeeds on successful retry [E]
══╡ EXCEPTION CAUGHT BY IMAGE RESOURCE SERVICE ╞═════════════════
The following TestFailure was thrown resolving a single-frame
image stream:
Expected: a value less than <2>
Actual: <2>
Which: is not a value less than <2>
When the exception was thrown, this was the stack:
#0 fail (package:matcher/src/expect/expect.dart:149:31)
#1 _expect (package:matcher/src/expect/expect.dart:144:3)
#2 expect (package:matcher/src/expect/expect.dart:56:3)
#3 expect (package:flutter_test/src/widget_tester.dart:458:18)
#4 main.<anonymous closure>.<anonymous closure>.<anonymous closure>.<anonymous closure> (file:///Users/hairon/Documents/packages/packages/flutter_image/test/network_test.dart:61:15)
#5 NetworkImageWithRetry._loadWithRetry (package:flutter_image/network.dart:202:43)
<asynchronous suspension>
#6 ImageStreamCompleter.setImage (package:flutter/src/painting/image_stream.dart:698:3)
<asynchronous suspension>
Image provider:
NetworkImageWithRetry("[http://localhost:11111/error.png",](http://localhost:11111/error.png%22,) scale:
1.0)
Image key:
NetworkImageWithRetry("[http://localhost:11111/error.png",](http://localhost:11111/error.png%22,) scale:
1.0)
═════════════════════════════════════════════════════════════════
package:matcher fail
test/network_test.dart 26:11 main.<fn>.<fn>.<fn>.<fn>
package:flutter/src/foundation/assertions.dart 1185:14 FlutterError.reportError
package:flutter/src/painting/image_stream.dart 802:20 ImageStreamCompleter.reportError
package:flutter/src/painting/image_stream.dart 863:7 new OneFrameImageStreamCompleter.<fn>
===== asynchronous gap ===========================
dart:async Future.then
package:flutter/src/painting/image_stream.dart 862:11 new OneFrameImageStreamCompleter
package:flutter_image/network.dart 109:12 NetworkImageWithRetry.loadBuffer
test/network_test.dart 163:50 assertThatImageLoadingSucceeds
test/network_test.dart 69:9 main.<fn>.<fn>.<fn>
01:04 +0 -3: NetworkImageWithRetry succeeds loads image from network with an extra header [E]
══╡ EXCEPTION CAUGHT BY IMAGE RESOURCE SERVICE ╞═════════════════
The following TestFailure was thrown resolving a single-frame
image stream:
══╡ EXCEPTION CAUGHT BY PACKAGE:FLUTTER_IMAGE ╞══════════════════
The following FetchFailure was thrown NetworkImageWithRetry
failed to load http://localhost:11111/extra_header.png:
FetchFailure(
attemptCount: 6
httpStatusCode: null
totalDuration: 0:00:31.107538
originalException: SocketException: Connection refused (OS
Error: Connection refused, errno = 61), address = localhost, port
= 51388
)
═════════════════════════════════════════════════════════════════
When the exception was thrown, this was the stack:
#0 fail (package:matcher/src/expect/expect.dart:149:31)
#1 main.<anonymous closure>.<anonymous closure>.<anonymous closure>.<anonymous closure> (file:///Users/hairon/Documents/packages/packages/flutter_image/test/network_test.dart:26:11)
#2 NetworkImageWithRetry._loadWithRetry (package:flutter_image/network.dart:214:28)
<asynchronous suspension>
#3 ImageStreamCompleter.setImage (package:flutter/src/painting/image_stream.dart:698:3)
<asynchronous suspension>
Image provider:
NetworkImageWithRetry("[http://localhost:11111/extra_header.png",](http://localhost:11111/extra_header.png%22,)
scale: 1.0)
Image key:
NetworkImageWithRetry("[http://localhost:11111/extra_header.png",](http://localhost:11111/extra_header.png%22,)
scale: 1.0)
═════════════════════════════════════════════════════════════════
package:matcher fail
test/network_test.dart 26:11 main.<fn>.<fn>.<fn>.<fn>
package:flutter/src/foundation/assertions.dart 1185:14 FlutterError.reportError
package:flutter/src/painting/image_stream.dart 802:20 ImageStreamCompleter.reportError
package:flutter/src/painting/image_stream.dart 863:7 new OneFrameImageStreamCompleter.<fn>
===== asynchronous gap ===========================
dart:async Future.then
package:flutter/src/painting/image_stream.dart 862:11 new OneFrameImageStreamCompleter
package:flutter_image/network.dart 109:12 NetworkImageWithRetry.loadBuffer
test/network_test.dart 163:50 assertThatImageLoadingSucceeds
test/network_test.dart 48:9 main.<fn>.<fn>.<fn>
01:33 +0 -3: NetworkImageWithRetry succeeds succeeds on successful retry [E]
TimeoutException after 0:00:30.000000: Test timed out after 30 seconds. See [test | Dart Package](https://pub.dev/packages/test#timeouts)
dart:isolate _RawReceivePort._handleMessage
To run this test again: /Users/hairon/fvm/versions/master/bin/cache/dart-sdk/bin/dart test /Users/hairon/Documents/packages/packages/flutter_image/test/network_test.dart -p vm --plain-name 'NetworkImageWithRetry succeeds succeeds on successful retry'
01:33 +0 -3: NetworkImageWithRetry fails retries 6 times then gives up 01:33 +1 -3: NetworkImageWithRetry fails retries 6 times then gives up 01:33 +1 -3: NetworkImageWithRetry fails gives up immediately on non-retriable errors (HTTP 404) 01:33 +1 -4: NetworkImageWithRetry fails gives up immediately on non-retriable errors (HTTP 404) [E]
Expected: a value less than <2>
Actual: <2>
Which: is not a value less than <2>
package:matcher expect
package:flutter_test/src/widget_tester.dart 458:18 expect
test/network_test.dart 117:11 main.<fn>.<fn>.<fn>.onAttempt
===== asynchronous gap ===========================
dart:async Timer.run
test/network_test.dart 126:19 main.<fn>.<fn>.<fn>.<fn>
package:flutter_image/network.dart 202:43 NetworkImageWithRetry._loadWithRetry
===== asynchronous gap ===========================
dart:async _CustomZone.registerUnaryCallback
package:flutter_image/network.dart 141:38 NetworkImageWithRetry._loadWithRetry
package:flutter_image/network.dart 109:41 NetworkImageWithRetry.loadBuffer
test/network_test.dart 143:50 assertThatImageLoadingFails
test/network_test.dart 133:9 main.<fn>.<fn>.<fn>
TimeoutException after 0:00:30.000000: Test timed out after 30 seconds. See [test | Dart Package](https://pub.dev/packages/test#timeouts)
dart:isolate _RawReceivePort._handleMessage
To run this test again: /Users/hairon/fvm/versions/master/bin/cache/dart-sdk/bin/dart test /Users/hairon/Documents/packages/packages/flutter_image/test/network_test.dart -p vm --plain-name 'NetworkImageWithRetry fails gives up immediately on non-retriable errors (HTTP 404)'
02:03 +1 -4: Some tests failed.Flutter Doctor output
Doctor output
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel master, 3.14.0-14.0.pre.361, on macOS 13.5.2 22G91 darwin-arm64 (Rosetta), locale en-UY)
[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 15.0)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2022.3)
[✓] IntelliJ IDEA Community Edition (version 2023.2.2)
No issues found!Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
P3Issues that are less important to the Flutter projectIssues that are less important to the Flutter projectfrom: manual-qaIssue caught from manual QA processIssue caught from manual QA processteam-ecosystemOwned by Ecosystem teamOwned by Ecosystem team
