-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
[flutter_local_notifications_windows] use flutter test instead of dart test #2459
Conversation
Weird: flutter_local_notifications_windows:
Resolving dependencies...
Downloading packages...
_fe_analyzer_shared 73.0.0 (76.0.0 available)
analyzer 6.8.0 (6.11.0 available)
ffigen 13.0.0 (15.0.0 available)
! flutter_local_notifications_platform_interface 8.1.0 from path ..\flutter_local_notifications_platform_interface (overridden in .\pubspec_overrides.yaml)
macros 0.1.2-main.4 (0.1.3-main.0 available)
matcher 0.12.16+1 (0.12.[17](https://github.com/MaikuB/flutter_local_notifications/actions/runs/11814739691/job/32914415296?pr=2459#step:6:18) available)
timezone 0.9.4 (0.10.0 available)
Got dependencies!
6 packages have newer versions incompatible with dependency constraints.
Try `flutter pub outdated` for more information.
✅ d:/a/flutter_local_notifications/flutter_local_notifications/flutter_local_notifications_windows/test/details_test.dart: Details: No details
✅ d:/a/flutter_local_notifications/flutter_local_notifications/flutter_local_notifications_windows/test/bindings_test.dart: Bindings work in simple cases
✅ d:/a/flutter_local_notifications/flutter_local_notifications/flutter_local_notifications_windows/test/bindings_test.dart: Bindings fail when ID is not found in simple cases
✅ d:/a/flutter_local_notifications/flutter_local_notifications/flutter_local_notifications_windows/test/bindings_test.dart: Bindings are included in show()
✅ d:/a/flutter_local_notifications/flutter_local_notifications/flutter_local_notifications_windows/test/details_test.dart: Details: Simple details
✅ d:/a/flutter_local_notifications/flutter_local_notifications/flutter_local_notifications_windows/test/details_test.dart: Details: Actions
✅ d:/a/flutter_local_notifications/flutter_local_notifications/flutter_local_notifications_windows/test/details_test.dart: Details: Audio
✅ d:/a/flutter_local_notifications/flutter_local_notifications/flutter_local_notifications_windows/test/bindings_test.dart: Bindings fail when notification has been cancelled
✅ d:/a/flutter_local_notifications/flutter_local_notifications/flutter_local_notifications_windows/test/plugin_test.dart: Plugin initializes safely
✅ d:/a/flutter_local_notifications/flutter_local_notifications/flutter_local_notifications_windows/test/plugin_test.dart: Plugin catches bad GUIDs
✅ d:/a/flutter_local_notifications/flutter_local_notifications/flutter_local_notifications_windows/test/plugin_test.dart: Plugin cannot be used before initializing
✅ d:/a/flutter_local_notifications/flutter_local_notifications/flutter_local_notifications_windows/test/plugin_test.dart: Plugin cannot be used after disposed
✅ d:/a/flutter_local_notifications/flutter_local_notifications/flutter_local_notifications_windows/test/plugin_test.dart: Plugin does not support repeating notifications
✅ d:/a/flutter_local_notifications/flutter_local_notifications/flutter_local_notifications_windows/test/scheduled_test.dart: Schedules work with basic times
✅ d:/a/flutter_local_notifications/flutter_local_notifications/flutter_local_notifications_windows/test/details_test.dart: Details: Rows
✅ d:/a/flutter_local_notifications/flutter_local_notifications/flutter_local_notifications_windows/test/details_test.dart: Details: Header
✅ d:/a/flutter_local_notifications/flutter_local_notifications/flutter_local_notifications_windows/test/details_test.dart: Details: Images
✅ d:/a/flutter_local_notifications/flutter_local_notifications/flutter_local_notifications_windows/test/details_test.dart: Details: Inputs
✅ d:/a/flutter_local_notifications/flutter_local_notifications/flutter_local_notifications_windows/test/details_test.dart: Details: Progress
✅ d:/a/flutter_local_notifications/flutter_local_notifications/flutter_local_notifications_windows/test/scheduled_test.dart: Schedules do not work with earlier time
✅ d:/a/flutter_local_notifications/flutter_local_notifications/flutter_local_notifications_windows/test/xml_test.dart: XML catches invalid XML
🎉 15 tests passed.
--------------------------------------------------------------------------------
$ melos exec
└> flutter test
└> FAILED (in 1 packages)
└> flutter_local_notifications_windows (with exit code 1)
melos run test:unit:windows
└> melos exec -c 1 -- "flutter test"
└> FAILED
ScriptException: The script test:unit:windows failed to execute. |
Yeah I noticed. Not sure what is going on there. I recall having a similar problem but don't remember the solution. I think it had to do with the folder/scope that melos was able to run in. If you have ideas then let me know |
Nope, don't know what's going on here 🤷♂️ |
I'm going to abandon this PR for now as I don't have time to see what's going on. Verbose logs seemingly indicate the error is thrown by the Flutter tooling. I haven't been able to reproduce this as I'm having trouble as I'm trouble running the tests locally now. I did take the old DLL you had and used it on my local machine but that worked. Potentially this is to do with having Windows ARM when I run build.bat on my machine. The number of tests being run also looks off when run via GitHub as it should be 21 tests |
Yeah, I had a lot of issues as well. The tests are inherently flaky due to flutter insisting on multithreading them, whereas the underlying Windows API is inherently not thread-safe. I attempt to explain / debug a bit in Here's something more concrete though -- when I run these locally: dart test --reporter compact # rewrites a single line to show progress, works 21/21
dart test --reporter expanded # each test on its own line, suddenly exits after 12
dart test --reporter github # the GitHub Actions text, suddenly exits after 12 These results aren't stable, and sometimes they do all work, but it's interesting that I was able to briefly recreate this problem locally. I'd say it's not worth fixing, and to let the exit code determine whether GitHub goes green or not |
Switched to
flutter test
to see if it helps improves output shown in the logs