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

TestSqoopJsonUtil.testGetJsonStringFromMap is depending on Map ordering in JDK

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.4.6
    • 1.4.7
    • None
    • 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

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

            Dates

              Created:
              Updated:
              Resolved: