Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[jaxrs-dev] Rx TCK Tests

Hello All,
I'm curious if anyone has some background on tests like [1]. It creates a CompletionStageRxInvoker, starts a request and converts the CompletationStage to a Future. All that seems fine, except when it gets to [2] where it checks if the future is done. It seems like a bit of a race condition to me to assume the future is done at this stage. While I've seen no issues running this locally or on most CI environments I've run it on, I do see issues on GitHub Actions which is failing several of the tests like this. It's definitely a timing issue because they don't all consistently fail, but it always fails at least one of them because the future is not yet done.

My assumption is the Future.isDone() check is to avoid the possible hang on Future.get(). However, it seems we could easily change that to something like Future.get(configurableTimeout, TimeUnit.SECONDS). Does this seem reasonable? I'm happy to contribute a patch if it seems reasonable.

Just to note too I absolutely do not think this should block any current 3.1 efforts :) The tests have been like this for a long time and for me it's ONLY failing on GitHub Actions.

Thanks in advance!

[1]: https://github.com/jakartaee/rest/blob/779683825b78996e5e35b8a7cbfa1f21dc0cf705/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/jaxrs21/ee/client/rxinvoker/JAXRSClientIT.java#L231-L237
[2]: https://github.com/jakartaee/rest/blob/779683825b78996e5e35b8a7cbfa1f21dc0cf705/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/jaxrs21/ee/client/rxinvoker/JAXRSClientIT.java#L1915

--
James R. Perkins
JBoss by Red Hat

Back to the top