You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2016/01/05 18:29:39 UTC

[jira] [Commented] (THRIFT-3521) TSimpleJSONProtocolTest is not deterministic (fails when run on JDK 8)

    [ https://issues.apache.org/jira/browse/THRIFT-3521?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15083412#comment-15083412 ] 

ASF GitHub Bot commented on THRIFT-3521:
----------------------------------------

GitHub user bgould opened a pull request:

    https://github.com/apache/thrift/pull/772

    THRIFT-3521 : TSimpleJSONProtocolTest is not deterministic (fails when run on JDK 8)

    This PR removes fields that cause TSimpleJSONProtocolTest to fail when run using different version of the Java standard library.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/bgould/thrift THRIFT-3521

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/thrift/pull/772.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #772
    
----
commit 61efde2a66c3da359c34ef8c377a660e5357b4bd
Author: BCG <bg...@users.noreply.github.com>
Date:   2016-01-05T17:18:23Z

    THRIFT-3521 : TSimpleJSONProtocolTest is not deterministic (fails when run on JDK 8)

----


> TSimpleJSONProtocolTest is not deterministic (fails when run on JDK 8)
> ----------------------------------------------------------------------
>
>                 Key: THRIFT-3521
>                 URL: https://issues.apache.org/jira/browse/THRIFT-3521
>             Project: Thrift
>          Issue Type: Bug
>          Components: Java - Library
>         Environment: OpenJDK 8
>            Reporter: Benjamin Gould
>            Assignee: Benjamin Gould
>            Priority: Minor
>             Fix For: 0.9.4
>
>
> TSimpleJSONProtocolTest has a couple of tests where structs are serialized, and the resultant JSON string is compared for equality with an expected value.
> Some of the structs' fields are sets, which do not ensure consistent ordering, causing this test to fail in environments where the "natural" ordering of the elements in the HashSet do not match the expected value.
> Suggested fix is to unset the fields that cause the inconsistent ordering and remove them from the expected value.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)