Skip to content

masini/reactive-rest-test

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

#Problems with RestEasy Reactive and Reactive REST Client

####Testing Reactive Version:

./mvnw test -P reactive

####Testing Resteasy Standard:

./mvnw test -P standard

Add quarkus2 to test with 2.0.0.Alpha1

##Test 1

What I expect

The CustomClientExceptionHandler should intercept the 401 response and send a 500 to callers, the response is then forwarded by RESTEasy to the calling client

What I obtain with Rest Client and RESTEasy

The MyCustomException is correctly thrown by MP Rest Client and 500 is sent to the caller by RESTEasy.

What I obtain with Reactive Rest Client and RESTEasy Reactive

No Handler is called a 204 is returned to the client (???!!!!)

##Test 2

What I expect

I expect the onFailer to transform the exception into a MyCustomException and the CustomClientExceptionHandler to be called

What I obtain with Rest Client and RESTEasy

The MyCustomException is correctly thrown by MP Rest Client and 500 is sent to the caller by RESTEasy.

What I obtain with Reactive Rest Client and RESTEasy Reactive

A WebClientApplicationException is received by the caller, the CustomClientExceptionHandler is not called but for some reason I ignore a MyCustomException is logged

##Test 3

What I expect

The CustomClientExceptionHandler should intercept the 401 response and send a 500 to callers, the response is then forwarded by RESTEasy to the calling client

What I obtain with Rest Client and RESTEasy

I got a RESTEASY002020: Unhandled asynchronous exception, sending back 500", but not a MyCustomException is thrown

What I obtain with Reactive Rest Client and RESTEasy Reactive

No Handler is called a 204 is returned to the client (???!!!!)

##Test 4

What I expect

REST Client should invoke the remote method with the correct headers, and the response should contains all header

What I obtain with Rest Client and RESTEasy

Work as expected

What I obtain with Reactive Rest Client and RESTEasy Reactive

A

java.lang.NullPointerException: Cannot invoke "Object.getClass()" because the return value of "javax.ws.rs.core.Response.getEntity()" is null

I also verified this into a filter, even context.getEntityStream() is null

##Test 5

What I expect

Same as Test 4 but reactive

What I obtain with Rest Client and RESTEasy

Work as expected

What I obtain with Reactive Rest Client and RESTEasy Reactive

No headers are sent into the request

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages