Flume
  1. Flume
  2. FLUME-1793

Unit test TestElasticSearchLogStashEventSerializer fails with IBM JDK

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: v1.3.0
    • Fix Version/s: v1.6.0
    • Component/s: Sinks+Sources, Test
    • Labels:
    • Environment:

      IBM Java 6 SR 12
      RHEL 6.3

      Description

      TestElasticSearchLogStashEventSerializer fails with IBM JDK:
      testRoundTrip(org.apache.flume.sink.elasticsearch.TestElasticSearchLogStashEventSerializer) Time elapsed: 0.201 sec <<< FAILURE!
      org.junit.ComparisonFailure:expected:<...p/test","@fields":{"[timestamp":"1355151725225","src_path":"/tmp/test","host":"test@localhost","headerNameTwo":"headerValueTwo","source":"flume_tail_src","headerNameOne":"headerValueOne","type":"sometyp]e"}}@@@@@@@@@@@@@@@@...> but was:<...p/test","@fields":{"[src_path":"/tmp/test","headerNameTwo":"headerValueTwo","timestamp":"1355151725225","host":"test@localhost","type":"sometype","source":"flume_tail_src","headerNameOne":"headerValueOn]e"}}@@@@@@@@@@@@@@@@...>

      The values on the "@fields" element are the same as expected, but the order is different. This test case works with SUN Java though - it seems like HashMap on IBM Java and SUN Java return values in different orders, and the test case is counting on order. Order shouldn't matter when using a hashmap though.

      1. FLUME-1793-1.patch
        6 kB
        li xiang
      2. FLUME-1793.patch
        3 kB
        Aline Guedes Pinto

        Issue Links

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              Aline Guedes Pinto
            • Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development