Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failing Test #193

Closed
1 task done
lishaduck opened this issue Sep 15, 2023 · 7 comments · Fixed by #204
Closed
1 task done

Failing Test #193

lishaduck opened this issue Sep 15, 2023 · 7 comments · Fixed by #204
Assignees
Labels
bug Something isn't working dart Regards Dart code help-wanted Extra attention is needed
Milestone

Comments

@lishaduck
Copy link
Member

lishaduck commented Sep 15, 2023

Contact Details

No response

What happened?

Bootstrap test failed.

Reproduction steps

n/a

What should have happened?

Shouldn't fail.

Date

Sep. 13th

What device are you seeing the problem on?

Mac

What platforms are you seeing the problem on? If on Web, also select browser.

MacOS

Context

I've been trying to fix this, but I can't figure out the issue.

Code of Conduct

  • I agree to follow this project's Code of Conduct
@lishaduck lishaduck added the bug Something isn't working label Sep 15, 2023
@lishaduck lishaduck self-assigned this Sep 15, 2023
@lishaduck lishaduck added help-wanted Extra attention is needed dart Regards Dart code labels Sep 15, 2023
@lishaduck lishaduck added this to the ELO Work milestone Sep 15, 2023
@lishaduck lishaduck assigned PetalCat and ParkerH27 and unassigned lishaduck Sep 19, 2023
@lishaduck
Copy link
Member Author

How's this goin', @ParkerH27?

@PetalCat
Copy link
Contributor

PetalCat commented Sep 30, 2023

I'mma be real: confusingly.

@lishaduck
Copy link
Member Author

Yeah. That was my experience. Did you see the branch I pushed w/my try @ fixing it?

@lishaduck
Copy link
Member Author

Context:

#187 was fine until it was rebased atop 491b9b6, which looks to be a completely unrelated change.

Logs:
'package:flutter_test/src/binding.dart': Failed assertion: line 1332 pos 12: 'inTest': is not true.
dart:core                                           _AssertionError._throwNew
package:flutter_test/src/binding.dart 1332:12       AutomatedTestWidgetsFlutterBinding.scheduleAttachRootWidget
package:flutter/src/widgets/binding.dart 1095:7     runApp
package:pirate_code/app/app.dart 79:5               App.bootstrap
===== asynchronous gap ===========================
dart:async                                          _CustomZone.registerBinaryCallback
test/app/app_test.dart 93:11                        main.<fn>.<fn>.<fn>
package:matcher                                     expectLater
package:flutter_test/src/widget_tester.dart 491:25  expectLater
test/app/app_test.dart 91:13                        main.<fn>.<fn>

This test failed after it had already completed.
Make sure to use a matching library which informs the test runner
of pending async work.
dart:core                                           _AssertionError._throwNew
package:flutter_test/src/binding.dart 1332:12       AutomatedTestWidgetsFlutterBinding.scheduleAttachRootWidget
package:flutter/src/widgets/binding.dart 1095:7     runApp
package:pirate_code/app/app.dart 79:5               App.bootstrap
===== asynchronous gap ===========================
dart:async                                          _CustomZone.registerBinaryCallback
test/app/app_test.dart 93:11                        main.<fn>.<fn>.<fn>
package:matcher                                     expectLater
package:flutter_test/src/widget_tester.dart 491:25  expectLater
test/app/app_test.dart 91:13                        main.<fn>.<fn>

00:29 +30 -2: Some tests failed.
Failing Tests:
 - test/app/app_test.dart 
        - [ERROR] Bootstrapping Tests! Test the boots...
        - [ERROR] Bootstrapping Tests! Test the boots...

Previous branch to fix test: fix-test

@lishaduck lishaduck linked a pull request Oct 2, 2023 that will close this issue
@lishaduck
Copy link
Member Author

Hmmm. It seems to be pretty flaky, seeing as it failed on merge queues and succeeded on pushes. Let's wait and see.

@lishaduck
Copy link
Member Author

lishaduck commented Oct 3, 2023

Nope. It's flaky, but at least we know that.
It's consistently failing on my macbook, so it might a linux thing.

@lishaduck lishaduck reopened this Oct 3, 2023
@lishaduck
Copy link
Member Author

Reposting this to keep threads on topic:

You wanna tackle this next after #193, @ParkerH27?

I guess so.... #193 is brain breaking

Yeah. Flaky tests are no fun. Did you look at 57339e9? I've found invertase's Assertions In Dart And Flutter Tests: An (Now For Sure) Ultimate Cheat Sheet to be quite useful. Also Flaky Tests: Getting Rid Of A Living Nightmare In Testing is a good article on why tests flake.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working dart Regards Dart code help-wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants