-
Notifications
You must be signed in to change notification settings - Fork 339
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
causalityDuration Hides code execution in duration
method
#233
Comments
I disagree, it is expected. Actually, that's the purpose of it. Let's see why with a concrete example. There's this Now, let's see how the nominal test is implemented: func Test_Observable_BufferWithTime(t *testing.T) {
ctx, obs, d := timeCausality(1, 2, 3, tick, tick, 4, tick, 5, 6, 7, tick)
obs = obs.BufferWithTime(d, WithContext(ctx))
Assert(context.Background(), t, obs, HasItems(
[]interface{}{1, 2, 3},
[]interface{}{4},
[]interface{}{5, 6, 7},
))
} Using If you need a simple mock, you can use |
I understand why it is there and how it works. My point is that it is not obvious and may confuse others.
|
Another thing is that introducing artificial pauses while sending data will hide things like this #234 |
Let's keep only #234 |
RxGo/duration.go
Line 84 in e94d354
It is not expected that
duration
method will actually do such sophisticated thing. I expect it to return duration value only.The text was updated successfully, but these errors were encountered: