Uploaded image for project: 'Flume'
  1. Flume
  2. FLUME-2488

TestElasticSearchRestClient fails on Oracle JDK 8

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.5.0.1
    • Fix Version/s: 1.6.0
    • Component/s: Sinks+Sources
    • Labels:

      Description

      The JSON comparison should be performed independently of the keys order:

      https://travis-ci.org/Stratio/flume/jobs/36847693#L6735

      shouldAddNewEventWithoutTTL(org.apache.flume.sink.elasticsearch.client.TestElasticSearchRestClient) Time elapsed: 493 sec <<< FAILURE!

      junit.framework.ComparisonFailure: expected:<{"index":{"_[type":"bar_type","_index":"foo_index]"}}

      {"body":"test"}

      > but was:<{"index":{"_[index":"foo_index","_type":"bar_type]"}}

      {"body":"test"}

      >

      at junit.framework.Assert.assertEquals(Assert.java:85)

      at junit.framework.Assert.assertEquals(Assert.java:91)

      at org.apache.flume.sink.elasticsearch.client.TestElasticSearchRestClient.shouldAddNewEventWithoutTTL(TestElasticSearchRestClient.java:105)

      1. FLUME-2488-0.patch
        5 kB
        Santiago M. Mola
      2. FLUME-2488-1.patch
        3 kB
        Johny Rufus

        Issue Links

          Activity

          Hide
          hshreedharan Hari Shreedharan added a comment -

          We have not really tested or worked to ensure JDK 8 builds. Any patch that goes in for JDK 8 fixes must be compatible with JDK 6 and 7 at least.

          Show
          hshreedharan Hari Shreedharan added a comment - We have not really tested or worked to ensure JDK 8 builds. Any patch that goes in for JDK 8 fixes must be compatible with JDK 6 and 7 at least.
          Hide
          smolav Santiago M. Mola added a comment -

          This patch should solve the problem and be backwards compatible.

          Show
          smolav Santiago M. Mola added a comment - This patch should solve the problem and be backwards compatible.
          Hide
          ejsarge Edward Sargisson added a comment -

          Hi Santiago M. Mola,
          Thanks for submitting the patch. I suspect we'll be needing this at my organization shortly.

          Could you please put the patch into an Apache Review Board and put a link to that into this ticket.
          I'll review it there.

          Show
          ejsarge Edward Sargisson added a comment - Hi Santiago M. Mola , Thanks for submitting the patch. I suspect we'll be needing this at my organization shortly. Could you please put the patch into an Apache Review Board and put a link to that into this ticket. I'll review it there.
          Hide
          hshreedharan Hari Shreedharan added a comment -

          I took a look at this. I think there is more change here than required. In this, there are changes in the actual JSON generation. This bug can be resolved by converting both the expected and actual result into JSON objects (or maps) and checking their equality.

          Show
          hshreedharan Hari Shreedharan added a comment - I took a look at this. I think there is more change here than required. In this, there are changes in the actual JSON generation. This bug can be resolved by converting both the expected and actual result into JSON objects (or maps) and checking their equality.
          Hide
          jrufus Johny Rufus added a comment -

          Hi Santiago M. Mola,
          I have a patch that just modifies the test like Hari mentioned above, shall I upload it or would you be uploading a new patch ?

          Show
          jrufus Johny Rufus added a comment - Hi Santiago M. Mola , I have a patch that just modifies the test like Hari mentioned above, shall I upload it or would you be uploading a new patch ?
          Hide
          roshan_naik Roshan Naik added a comment -

          Johny Rufus or Santiago M. Mola please do upload the revised the patch as requested by Hari Shreedharan.

          Show
          roshan_naik Roshan Naik added a comment - Johny Rufus or Santiago M. Mola please do upload the revised the patch as requested by Hari Shreedharan .
          Hide
          smolav Santiago M. Mola added a comment -

          Johny Rufus Feel free to upload yours!

          Show
          smolav Santiago M. Mola added a comment - Johny Rufus Feel free to upload yours!
          Hide
          jrufus Johny Rufus added a comment -

          Attaching a patch that fixes the test. Thanks !!

          Show
          jrufus Johny Rufus added a comment - Attaching a patch that fixes the test. Thanks !!
          Hide
          ejsarge Edward Sargisson added a comment -

          Would you be able to put this patch in a Review Board?
          'tis the procedure this group likes...

          Show
          ejsarge Edward Sargisson added a comment - Would you be able to put this patch in a Review Board? 'tis the procedure this group likes...
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit d1227feb601f30d0c7ec2910b91e648ee410d179 in flume's branch refs/heads/trunk from Jarek Jarcec Cecho
          [ https://git-wip-us.apache.org/repos/asf?p=flume.git;h=d1227fe ]

          FLUME-2488: TestElasticSearchRestClient fails on Oracle JDK 8

          (Johny Rufus via Jarek Jarcec Cecho)

          Show
          jira-bot ASF subversion and git services added a comment - Commit d1227feb601f30d0c7ec2910b91e648ee410d179 in flume's branch refs/heads/trunk from Jarek Jarcec Cecho [ https://git-wip-us.apache.org/repos/asf?p=flume.git;h=d1227fe ] FLUME-2488 : TestElasticSearchRestClient fails on Oracle JDK 8 (Johny Rufus via Jarek Jarcec Cecho)
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit 5600b70a09558e84c487c6a8f9f926337ca6c163 in flume's branch refs/heads/flume-1.6 from Jarek Jarcec Cecho
          [ https://git-wip-us.apache.org/repos/asf?p=flume.git;h=5600b70 ]

          FLUME-2488: TestElasticSearchRestClient fails on Oracle JDK 8

          (Johny Rufus via Jarek Jarcec Cecho)

          Show
          jira-bot ASF subversion and git services added a comment - Commit 5600b70a09558e84c487c6a8f9f926337ca6c163 in flume's branch refs/heads/flume-1.6 from Jarek Jarcec Cecho [ https://git-wip-us.apache.org/repos/asf?p=flume.git;h=5600b70 ] FLUME-2488 : TestElasticSearchRestClient fails on Oracle JDK 8 (Johny Rufus via Jarek Jarcec Cecho)
          Hide
          jarcec Jarek Jarcec Cecho added a comment -

          I've committed the change as it seemed pretty straightforward.

          Show
          jarcec Jarek Jarcec Cecho added a comment - I've committed the change as it seemed pretty straightforward.
          Hide
          hudson Hudson added a comment -

          SUCCESS: Integrated in flume-trunk #702 (See https://builds.apache.org/job/flume-trunk/702/)
          FLUME-2488: TestElasticSearchRestClient fails on Oracle JDK 8 (jarcec: http://git-wip-us.apache.org/repos/asf/flume/repo?p=flume.git&a=commit&h=d1227feb601f30d0c7ec2910b91e648ee410d179)

          • flume-ng-sinks/flume-ng-elasticsearch-sink/src/test/java/org/apache/flume/sink/elasticsearch/client/TestElasticSearchRestClient.java
          Show
          hudson Hudson added a comment - SUCCESS: Integrated in flume-trunk #702 (See https://builds.apache.org/job/flume-trunk/702/ ) FLUME-2488 : TestElasticSearchRestClient fails on Oracle JDK 8 (jarcec: http://git-wip-us.apache.org/repos/asf/flume/repo?p=flume.git&a=commit&h=d1227feb601f30d0c7ec2910b91e648ee410d179 ) flume-ng-sinks/flume-ng-elasticsearch-sink/src/test/java/org/apache/flume/sink/elasticsearch/client/TestElasticSearchRestClient.java
          Hide
          hudson Hudson added a comment -

          SUCCESS: Integrated in Flume-trunk-hbase-98 #59 (See https://builds.apache.org/job/Flume-trunk-hbase-98/59/)
          FLUME-2488: TestElasticSearchRestClient fails on Oracle JDK 8 (jarcec: http://git-wip-us.apache.org/repos/asf/flume/repo?p=flume.git&a=commit&h=d1227feb601f30d0c7ec2910b91e648ee410d179)

          • flume-ng-sinks/flume-ng-elasticsearch-sink/src/test/java/org/apache/flume/sink/elasticsearch/client/TestElasticSearchRestClient.java
          Show
          hudson Hudson added a comment - SUCCESS: Integrated in Flume-trunk-hbase-98 #59 (See https://builds.apache.org/job/Flume-trunk-hbase-98/59/ ) FLUME-2488 : TestElasticSearchRestClient fails on Oracle JDK 8 (jarcec: http://git-wip-us.apache.org/repos/asf/flume/repo?p=flume.git&a=commit&h=d1227feb601f30d0c7ec2910b91e648ee410d179 ) flume-ng-sinks/flume-ng-elasticsearch-sink/src/test/java/org/apache/flume/sink/elasticsearch/client/TestElasticSearchRestClient.java

            People

            • Assignee:
              jrufus Johny Rufus
              Reporter:
              smolav Santiago M. Mola
            • Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development