Uploaded image for project: 'Sqoop'
  1. Sqoop
  2. SQOOP-2753

TestSqoopJsonUtil.testGetJsonStringFromMap is depending on Map ordering in JDK

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.4.6
    • Fix Version/s: 1.4.7
    • Component/s: None
    • Labels:
      None

      Description

      The test is comparing hardcoded string that represents map, however map order is JDK version specific thus resulting in:

      junit.framework.AssertionFailedError: expected:<{"k[3":"v3","k1":"v1","k2":"v2]"}> but was:<{"k[1":"v1","k2":"v2","k3":"v3]"}>
      	at org.apache.sqoop.util.TestSqoopJsonUtil.testGetJsonStringFromMap(TestSqoopJsonUtil.java:31)
      

        Attachments

        1. SQOOP-2753.patch
          0.7 kB
          Jarek Jarcec Cecho

          Activity

            People

            • Assignee:
              jarcec Jarek Jarcec Cecho
              Reporter:
              jarcec Jarek Jarcec Cecho
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: