Closed hutchig closed 5 years ago
This one failure occurred 1 out of 3 times on Windows 8 for this build instance and passed on the other 179 platforms that this build instance's level of code was tested against. Also it has not occurred on any of the previous levels of code on any platform.
We run a LOT of batch tests on Liberty which includes smallrye reactive streams operators 1.0.0.
One (only one) of these many test runs threw up:
Test is here: https://github.com/reactive-streams/reactive-streams-jvm/blob/master/tck/src/main/java/org/reactivestreams/tck/PublisherVerification.java
::required_spec109_mustIssueOnSubscribeForNonNullSubscriber Calling:
Looking into the Exception in the 'cause' 'e' we see a problem in a Processor's subscribe method call:
This is doubly interesting as if it was single threaded it would be logically impossible:
So the state is changed to what it looks like what it would tolerate on another thread but the state change is only observed on this thread at [2] and certainly is NOT observable at point [1] as we have gone past the check for the state being State.COMPLETE and failed it, only for the print out of the tested value a few lines below show it would suceed if retested as the state IS now State.COMPLETE.
I understand this is just testing a TCK corner where a completed Subsciber is re-subscribed once it is finished and the 'correct' behaviour does this:
So this is not a problem that will impact customers as far as I can tell - just really picky TCKs!
I will have a rummage about in the code to see if I can see a good fix but not today most likely.