RxPHP icon indicating copy to clipboard operation
RxPHP copied to clipboard

[WIP] Higher-Order Marble tests

Open davidwdan opened this issue 7 years ago • 7 comments

I cherry picked the higher-order test code from v1 so we can start working on getting higher-order marble tests working.

Some tests are failing.
@martinsik if you get a chance, can you look at the failing tests?

davidwdan avatar Mar 10 '17 23:03 davidwdan

@davidwdan Can you give me write permissions to your marbleTest branch?

martinsik avatar Mar 11 '17 12:03 martinsik

@martinsik you have permission now. I think the issue is that in some circumstances there are multiple test schedulers. If I hack it and pass the test scheduler through the onNext helper function, it works.

davidwdan avatar Mar 11 '17 13:03 davidwdan

Coverage Status

Coverage decreased (-0.09%) to 99.908% when pulling 08b0e0af9fc35ee972cc78ce18da23e80fe4be73 on davidwdan:marbleTest into 23e32cafd8d90a4c6d0df5e67172eff2e464571c on ReactiveX:2.x.

coveralls avatar Mar 11 '17 16:03 coveralls

Inner observables are now materialized when being converted to a string. This simplifies things and gets rid of the need to check the instance of the observers.

The test automatic_mock_observer_doesnt_create_loggable_subscription is failing, but I not sure if it's still needed or when those inner subscriptions should start and stop.

davidwdan avatar Mar 11 '17 23:03 davidwdan

Coverage Status

Coverage remained the same at 100.0% when pulling ee4ec612fd087ed032361774db3ba3cffc650dcb on davidwdan:marbleTest into 23e32cafd8d90a4c6d0df5e67172eff2e464571c on ReactiveX:2.x.

coveralls avatar Mar 12 '17 21:03 coveralls

@davidwdan That test is irrelevant because now the MockObserver automatically subscribes only when calling OnNextNotification:: __toString().

It was previously used in situations where we don't want to log subscriptions. For example in tests such as MergeAllTest.php#L14 where it's not a problem anymore because there are no __toString() calls on $xs or $ys.

martinsik avatar Mar 12 '17 21:03 martinsik

I added a groupBy marble test that is currently failing. We may have to change where the inner observable is materialized

davidwdan avatar Mar 12 '17 22:03 davidwdan