Closed mguillet closed 9 years ago
Could you add a unit test ?
Yes, I will!
I'll try to do that by the end of the week. Would that be ok?
Yes thanks !
I'm working on the project right now, so don't forget to update first.
If you look as https://github.com/vert-x3/vertx-service-proxy/pull/30, there are a couple of clustered tests. This PR (I hope) will be merged before this weekend. So you can easily add your tests there.
Hello @cescoffier, any reason you're not using vert-unit in your clustered test from #30 ?
No real reason (just my own habits), you can use vertx-unit.
Okay then I might :-) ! I find it quite elegant.
I'm working on the subject: I will grab some of the test ressources from #30 you created and wait for it to be merged before I update this PR. I that OK for you?
Yes, thanks !
Ok, it was easier and more logical to plug my test on what you've done.
One question though: in the documentation it states that you can return a Map<String, JsonObject>
from a service call. But the code generation forbids it:
type io.vertx.core.Handler<io.vertx.core.AsyncResult<java.util.Map<java.lang.String,io.vertx.core.json.JsonObject>>> is not legal for use for a parameter in proxy
Which one is right?
I've commented out my test related to Maps...
I guess the document is wrong. Could you tell me where you found it ?
In the README.md of this project around line 244
Thanks !
The mongo service proxy violates some method signatures when running over a cluster of several node.
For instance, the method:
Doesn't return a instance of
List<JsonObject>
but aList<Map>
instance instead.I've tried to explain the issue in this topic: https://groups.google.com/d/topic/vertx/7pMZEMsjZNE/discussion
According to the documentation of
vertx-service-proxy
, you can only haveJsonObject
orJsonArray
contained in instances ofMap
,List
orSet
.So, now in
convertList
andconvertMap
the code:JsonObject
orJsonArray
, the collection is returned directly modified.Map
or aList
), the code will rebuild a new collection by wrapping these instances intoJsonObject
orJsonArray
respectively.