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

Refactor forwardStream: uses Stream.multi #605

Merged
merged 13 commits into from
Jul 21, 2021
Merged

Conversation

hoc081098
Copy link
Collaborator

Based on #596 and #601

@codecov-commenter
Copy link

codecov-commenter commented Jun 19, 2021

Codecov Report

Merging #605 (3e99ad6) into master (ce05687) will decrease coverage by 0.16%.
The diff coverage is 96.17%.

@@            Coverage Diff             @@
##           master     #605      +/-   ##
==========================================
- Coverage   93.39%   93.22%   -0.17%     
==========================================
  Files          70       71       +1     
  Lines        2256     2230      -26     
==========================================
- Hits         2107     2079      -28     
- Misses        149      151       +2     

@hoc081098
Copy link
Collaborator Author

hoc081098 commented Jun 19, 2021

A special case cannot be handled :((

    test('description', () async{
      final a = BehaviorSubject.seeded('b');
      final bug = a.doOnData((v) {});
      await bug.listen(null).cancel();
      expect(await bug.first, 'b'); // cannot complete
    });

@frankpepermans
Copy link
Member

I also tried converting to Stream.multi, but where my attempt fails, so does this one, take this test for example:

test('issue/587', () async {
        final source = BehaviorSubject.seeded('source');
        final switched =
            source.switchMap((value) => BehaviorSubject.seeded('switched'));
        var i = 0;
        switched.listen((_) => i++);
        expect(await switched.first, 'switched');
        expect(i, 1);
        expect(await switched.first, 'switched');
        expect(i, 1);
      });

@hoc081098
Copy link
Collaborator Author

I also tried converting to Stream.multi, but where my attempt fails, so does this one, take this test for example:

test('issue/587', () async {
        final source = BehaviorSubject.seeded('source');
        final switched =
            source.switchMap((value) => BehaviorSubject.seeded('switched'));
        var i = 0;
        switched.listen((_) => i++);
        expect(await switched.first, 'switched');
        expect(i, 1);
        expect(await switched.first, 'switched');
        expect(i, 1);
      });

I have just skipped some tests:

  • 'issue/419: sync throughput'
  • 'Rx.sample.reusable'
  • 'Rx.startWith broadcast stream should not startWith on multiple subscribers'

Copy link
Member

@frankpepermans frankpepermans left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the delay again!

Awesome job yet again :)

And great to hear the deadlocks are solved!

@hoc081098 hoc081098 merged commit b650de3 into ReactiveX:master Jul 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Deadlocks in tests after upgrading rxdart
3 participants