sqoop-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Szabolcs Vasas (JIRA)" <j...@apache.org>
Subject [jira] [Created] (SQOOP-3195) SQLServerDatatypeImportDelimitedFileTest can fail in some environments
Date Tue, 06 Jun 2017 10:26:18 GMT
Szabolcs Vasas created SQOOP-3195:

             Summary: SQLServerDatatypeImportDelimitedFileTest can fail in some environments
                 Key: SQOOP-3195
                 URL: https://issues.apache.org/jira/browse/SQOOP-3195
             Project: Sqoop
          Issue Type: Test
            Reporter: Szabolcs Vasas
            Assignee: Szabolcs Vasas

I tried to execute the SQLServer third party tests with two different SQL Server versions.
With SQL Server 2014 Express edition all the tests were successful however with SQL Server
2017 Developer edition I got the following error:

[junit] Test org.apache.sqoop.manager.sqlserver.SQLServerDatatypeImportDelimitedFileTest FAILED

  Failure for following Test Data :
  SCALE : null
  PREC : null
  TO_INSERT : 1.7976931348623157
  DB_READBACK : 1.7976931348623155
  HDFS_READBACK : 1.7976931348623155
  OFFSET : 8
  Exception details :

   expected a different string expected:<1.797693134862315[5]> but was:<1.797693134862315[7]>

By looking at the test case I have found that it inserts 1.7976931348623157 into the database
but it expects 1.7976931348623155 (the last digit is 5 instead of 7) probably because float
is an approximate numeric data types on MSSQL and on earlier versions this is how it worked

I suggest using a less precise float number in this test case to avoid flakyness.

This message was sent by Atlassian JIRA

View raw message