[
https://issues.apache.org/jira/browse/THRIFT-815?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12895385#action_12895385
]
Roger Meier commented on THRIFT-815:
------------------------------------
I did not test with the Java Server. It seems, that it returns other values as
the C++ Test Server for Exceptions, all the other things are just the same, but
testInsanity is broken on both test sites.
Is there a defined standard for Interoperability tests across all languages?
I can not imagine that there are some error's with the c++ encoding. I did some
tests with JSON and Binary with simple and HTTP Server. I verified the JSON
Packets on wire for HTTP and regular TCP transport. => Everything is correct.
The other test I've added does verify more details and uses [json2 |
http://www.JSON.org/json2.js] in addition to QUnit.
see: http://www.bufferoverflow.ch/thrift/test/test_roger.html
There, I recognized some error's with map types.
As mentioned in THRIFT-829, Im still not sure if loading the JSON response into
one object (robj) and reading parts of that object depending on the data type
is a problem for decoding Thrift JSON Protocol within JavaScript.
I think, that all Languages supported by Thrift do parse the JSON message
within the Protocol Implementation without special functions like the eval
function provided by JavaScript.
> Deserialization of lists is critically broken.
> ----------------------------------------------
>
> Key: THRIFT-815
> URL: https://issues.apache.org/jira/browse/THRIFT-815
> Project: Thrift
> Issue Type: Bug
> Components: Compiler (JavaScript)
> Affects Versions: 0.4
> Reporter: Jordan
> Assignee: T Jake Luciani
> Priority: Critical
> Fix For: 0.4
>
> Attachments: 813-1.patch, test.html, THRIFT-815_thrift.js.patch
>
>
> Edit the test code that comes with the js language target:
> var list = [1,2,3];
> var ret = client.testList(list);
> debugger;
> ret comes back as [3,3,3] when it should be echoed back as [1,2,3]
> The test case never caught this because it only verified the size, and not
> the contents of the returned array.
> I cannot find an immediate workaround, but I will try wrapping it in a dummy
> type like ListServiceResponse.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.