Skip to content

Not replay executionObservables for execute() #64

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

Merged
merged 2 commits into from
Dec 29, 2016

Conversation

ishkawa
Copy link
Member

@ishkawa ishkawa commented Dec 24, 2016

I found second call of execute() returns the same output which the first time returned.
This issue started to happen from version 2.1.0, and doesn't happen when one use input only.

This issue is caused by replaying execution observable. To fix this issue, this PR replaces sharedReplay(1) of executionObservable with share() so that execute() returns always return the latest execution observable.

I'm sorry for overlooking this issue.
I've also update unit tests to detect the same kind of issue.

@ishkawa
Copy link
Member Author

ishkawa commented Dec 24, 2016

I found another issue with execute(_:), which is related to #63.

When execute(_:) is called while action is executing, both the first observable and the second observable fails with notEnabled error.

  • Expected sequence

    execute(_:):               `-a-b----`
    returned observable for a: `-----a--`
    returned observable for b: `---x----` (x: notEnabled)
    
  • Actual sequence

    execute(_:):               `-a-b----`
    returned observable for a: `---x----` (x: notEnabled)
    returned observable for b: `---x----` (x: notEnabled)
    

I've fixed this issue and added test cases in f15eebb 🙇

Copy link
Member

@ashfurrow ashfurrow left a comment

Choose a reason for hiding this comment

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

Great work, thanks!

@ashfurrow ashfurrow merged commit 6c13748 into master Dec 29, 2016
@ashfurrow ashfurrow deleted the not-replay-execution branch December 29, 2016 21:32
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.

2 participants