sqoop-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Veena Basavaraj (JIRA)" <j...@apache.org>
Subject [jira] [Created] (SQOOP-2253) TestJSONIntermediateFormat unit test fails with JDK1.8
Date Mon, 23 Mar 2015 17:16:11 GMT
Veena Basavaraj created SQOOP-2253:
--------------------------------------

             Summary: TestJSONIntermediateFormat unit test fails with JDK1.8
                 Key: SQOOP-2253
                 URL: https://issues.apache.org/jira/browse/SQOOP-2253
             Project: Sqoop
          Issue Type: Bug
            Reporter: Veena Basavaraj


the exact test case failing.

The order of JSON created changes, best to avoid such a test case validation. Rather advisable
to check for individual fields in JSON 

{code}
  /**
   * setCSVGetData setCSVGetObjectArray setCSVGetCSV
   * Fails with JDK 1.8
   */
  public void testInputAsCSVTextInAndDataOut() {

    String csvText = "10,34,'54','random data',"
        + getByteFieldString(new byte[] { (byte) -112, (byte) 54 }) + ",'" + String.valueOf(0x0A)
        + "','ENUM'," + csvArray + "," + map + ",true," + dateTime + "," + time + "," + date
        + ",13.44," + csvSet;
    dataFormat.setCSVTextData(csvText);
    String jsonExpected = "{\"15\":[[11,12],[14,15]],\"13\":\"2014-10-01\",\"14\":13.44,\"11\":\"2014-10-01
12:00:00.000\","
        + "\"12\":\"12:59:59\",\"3\":\"54\",\"2\":34,\"1\":10,\"10\":true,\"7\":\"ENUM\",\"6\":\"10\",\"5\":\"kDY=\",\"4\":\"random
data\","
        + "\"9\":{\"testKey\":\"testValue\"},\"8\":[[11,11],[14,15]]}";
    assertEquals(jsonExpected, dataFormat.getData().toJSONString());
  }
{code}



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

Mime
View raw message