Closed zambrovski closed 2 months ago
This message probably means that taskRepository.getTaskUpdates(lastSeenResumeToken)
returns null. I often see that when a mock is not stubbed for the given parameters.
Regarding the lastSeenResumeToken
: yes, it is not perfect, but I think it's ok in this context because there will only ever be one subscription per instance of TaskChangeTracker
. Possibly there is a way to do it with an AtomicReference
in the SubscriberContext
, but I'm not sure if that's worth the effort.
The test run of Mongo View in Polyflow logs strange exceptions. I started to analyze the implementation but I'll need the help of @lbilger because I can't fix it for the moment.
The test class is:
TaskChangeTrackerTest
I also looked in the implementation and found a strange reactive code style in the
TaskChangeTracker
itself. I believe modification of a class member as a side effect of the reactivedoOnNext()
is a smell. Can this be improved too?Steps to reproduce
Expected behaviour
Only expected exceptions (thrown in the test and logged by the correposning statements) should appear in log of the test execution.
Actual behaviour
This one is surprising