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

repeat() operator behavior #516

Closed
kwonoj opened this issue Oct 13, 2015 · 4 comments
Closed

repeat() operator behavior #516

kwonoj opened this issue Oct 13, 2015 · 4 comments
Assignees
Labels
bug Confirmed bug

Comments

@kwonoj
Copy link
Member

kwonoj commented Oct 13, 2015

In some cases it seems resubscription does not triggered correctly. for example,

Rx.Observable.interval(40).take(2).repeat(2).subscribe(console.log, null, function(){console.log('completed')});

RxJS4

0
1
0
1
completed

RxJS5

0
1
(does not complete)

@kwonoj
Copy link
Member Author

kwonoj commented Oct 13, 2015

I'll try to look into this as well as expanding test coverages of repeat operator.

@benlesh benlesh added the bug Confirmed bug label Oct 13, 2015
kwonoj added a commit to kwonoj/rxjs that referenced this issue Oct 15, 2015
- repeat operator now supports resubscription behavior properly along
with infinite repeat
- add, expand test coverage
- update micro perf test case

closes ReactiveX#516
kwonoj added a commit to kwonoj/rxjs that referenced this issue Oct 15, 2015
- repeat operator now supports resubscription behavior properly along
with infinite repeat

closes ReactiveX#516
@benlesh
Copy link
Member

benlesh commented Oct 16, 2015

It's possible that this and catch suffer from the same bugs retry and retryWhen do, as described here #546

@kwonoj
Copy link
Member Author

kwonoj commented Oct 16, 2015

I just gave a try quick code snippet like

Observable.create(function (observer) {
  observer.error('bad');
  return function () {
    console.log('tear down');
  };
}).repeat(2).subscribe(console.log, console.log, function () {console.log('complete')});

which shows result as

bad
tear down

between RxJS4 and this implementation both. Can this be considered as passing sign, or did I try it incorrectly?

@benlesh
Copy link
Member

benlesh commented Oct 17, 2015

Thanks @kwonoj.

@lock lock bot locked as resolved and limited conversation to collaborators Jun 7, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Confirmed bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants