-
Notifications
You must be signed in to change notification settings - Fork 272
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
Cannot await stream after upgrading to rxdart 0.27.1 to 0.27.2 in Flutter tests #691
Comments
I wrap group('subject test', () {
testWidgets('wait first', (tester) async {
final subject = BehaviorSubject<String>();
subject.add('my-value');
final Stream<String> stream = subject.stream;
await tester.runAsync(() async {
expect(await stream.first, 'my-value');
});
await subject.close();
});
}); |
Thank you @hoc081098, is this a regression in rxdart? I'm not sure why wrapping it in |
I'm still running into this - unfortunately wrapping our entire widget test in runAsync causes it to fail for other reasons so its not a reasonable workaround for us. I've found that this for some reason fixes the tests |
Hello! After I have upgraded from rxdart 0.27.1 to 0.27.5, my tests have started failing. I found the test starts failing from rxdart 0.27.2:
This test only fails when using
flutter_test
instead oftest
(however, in the actual test case I need to useflutter_test
as there are some widgets being tested), so the interesting thing is this test will work:The first code snippet test (with
flutter_test
) now just hangs, but previously it ran correctly in rxdart 0.27.1. The second code snippet (withtest
) works on all version of rxdart.The text was updated successfully, but these errors were encountered: