Skip to content

Error if org.microshed.testing.jaxrs.RESTClient return CompletionStage #213

@gkwan-ibm

Description

@gkwan-ibm

Describe the bug
A service provides a REST api return CompletionStage<>.
Used MST RESTClient to test it, got following error:

javax.ws.rs.client.ResponseProcessingException: Problem with reading the data, class java.util.concurrent.CompletionStage, ContentType: application/json.

To Reproduce

[ERROR] Tests run: 2, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 41.349 s <<< FAILURE! - in it.io.openliberty.guides.inventory.InventoryServiceIT
[ERROR] testGetProperty  Time elapsed: 0.937 s  <<< ERROR!
javax.ws.rs.client.ResponseProcessingException: Problem with reading the data, class java.util.concurrent.CompletionStage, ContentType: application/json.
	at it.io.openliberty.guides.inventory.InventoryServiceIT.testGetProperty(InventoryServiceIT.java:96)
Caused by: javax.json.bind.JsonbException: Internal error: Unexpected char 82 at (line no=1, column no=1, offset=0)
	at it.io.openliberty.guides.inventory.InventoryServiceIT.testGetProperty(InventoryServiceIT.java:96)
Caused by: javax.json.stream.JsonParsingException: Unexpected char 82 at (line no=1, column no=1, offset=0)
	at it.io.openliberty.guides.inventory.InventoryServiceIT.testGetProperty(InventoryServiceIT.java:96)

Expected behavior
No error and test can be passed

System information:

  • OS: Linux, Mac
  • Java Version: 8
  • MicroShed Testing Version: 0.9

Additional context
MicroProfile rest client supports to return CompletionStage

Metadata

Metadata

Assignees

No one assigned

    Labels

    is:bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions