Details

    • Type: Sub-task
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.5.0
    • Component/s: None
    • Labels:
      None

      Description

      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 :
      FLOAT
      SCALE : null
      PREC : null
      TO_INSERT : 1.7976931348623157
      DB_READBACK : 1.7976931348623155
      HDFS_READBACK : 1.7976931348623155
      NEG_POS_FLAG : POS
      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 but.

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

      1. SQOOP-3195.patch
        0.7 kB
        Szabolcs Vasas

        Issue Links

          Activity

          Hide
          BoglarkaEgyed Boglarka Egyed added a comment -

          Thanks Szabolcs Vasas for this!

          Show
          BoglarkaEgyed Boglarka Egyed added a comment - Thanks Szabolcs Vasas for this!
          Hide
          hudson Hudson added a comment -

          SUCCESS: Integrated in Jenkins build Sqoop-hadoop200 #1126 (See https://builds.apache.org/job/Sqoop-hadoop200/1126/)
          SQOOP-3195: SQLServerDatatypeImportDelimitedFileTest can fail in some (bogi: https://git-wip-us.apache.org/repos/asf?p=sqoop.git&a=commit&h=1378520e498595bc46002395f2d50412a42a1df3)

          • (edit) testdata/DatatypeTestData-import-lite.txt
          Show
          hudson Hudson added a comment - SUCCESS: Integrated in Jenkins build Sqoop-hadoop200 #1126 (See https://builds.apache.org/job/Sqoop-hadoop200/1126/ ) SQOOP-3195 : SQLServerDatatypeImportDelimitedFileTest can fail in some (bogi: https://git-wip-us.apache.org/repos/asf?p=sqoop.git&a=commit&h=1378520e498595bc46002395f2d50412a42a1df3 ) (edit) testdata/DatatypeTestData-import-lite.txt
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit 1378520e498595bc46002395f2d50412a42a1df3 in sqoop's branch refs/heads/trunk from Boglarka Egyed
          [ https://git-wip-us.apache.org/repos/asf?p=sqoop.git;h=1378520 ]

          SQOOP-3195: SQLServerDatatypeImportDelimitedFileTest can fail in some environments

          (Szabolcs Vasas via Boglarka Egyed)

          Show
          jira-bot ASF subversion and git services added a comment - Commit 1378520e498595bc46002395f2d50412a42a1df3 in sqoop's branch refs/heads/trunk from Boglarka Egyed [ https://git-wip-us.apache.org/repos/asf?p=sqoop.git;h=1378520 ] SQOOP-3195 : SQLServerDatatypeImportDelimitedFileTest can fail in some environments (Szabolcs Vasas via Boglarka Egyed)

            People

            • Assignee:
              vasas Szabolcs Vasas
              Reporter:
              vasas Szabolcs Vasas
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development