Uploaded image for project: 'Apache NiFi'
  1. Apache NiFi
  2. NIFI-3565

TransformersTest fails when building under different locales

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.2.0
    • Fix Version/s: 1.2.0
    • Component/s: Extensions, Tools and Build
    • Labels:
      None

      Description

      Running a build with the following

      mvn clean install -Dmaven.surefire.arguments="-Duser.language=FR -Duser.region=fr"
      

      results in failures with the TransformersTest for presumably similar reasons to NIFI-3483.

      Tests run: 14, Failures: 0, Errors: 3, Skipped: 0, Time elapsed: 5.314 sec <<< FAILURE! - in org.apache.nifi.schemaregistry.processors.TransformersTest
      [5] input_csv/decimal_logicalType.txt,input_avro/decimal_logicalType_valid_scale_with_no_default.txt,expected_ouput_csv/decimal_logicalType.txt (testCSVRoundtrip)(org.apache.nifi.schemaregistry.processors.TransformersTest)  Time elapsed: 0.762 sec  <<< ERROR!
      java.lang.NumberFormatException: null
      	at java.math.BigDecimal.<init>(BigDecimal.java:494)
      	at java.math.BigDecimal.<init>(BigDecimal.java:383)
      	at java.math.BigDecimal.<init>(BigDecimal.java:806)
      	at org.apache.nifi.schemaregistry.processors.CSVUtils.write(CSVUtils.java:161)
      	at org.apache.nifi.schemaregistry.processors.TransformersTest.testCSVRoundtrip(TransformersTest.java:149)
      
      [6] input_csv/decimal_logicalType.txt,input_avro/decimal_logicalType_invalid_scale_with_default.txt,expected_ouput_csv/decimal_logicalType_invalid_scale.txt (testCSVRoundtrip)(org.apache.nifi.schemaregistry.processors.TransformersTest)  Time elapsed: 0 sec  <<< ERROR!
      java.lang.NumberFormatException: null
      	at java.math.BigDecimal.<init>(BigDecimal.java:494)
      	at java.math.BigDecimal.<init>(BigDecimal.java:383)
      	at java.math.BigDecimal.<init>(BigDecimal.java:806)
      	at org.apache.nifi.schemaregistry.processors.CSVUtils.write(CSVUtils.java:161)
      	at org.apache.nifi.schemaregistry.processors.TransformersTest.testCSVRoundtrip(TransformersTest.java:149)
      
      [7] input_csv/decimal_logicalType_missing_value.txt,input_avro/decimal_logicalType_valid_scale_with_default.txt,expected_ouput_csv/decimal_logicalType_valid_scale_with_default.txt (testCSVRoundtrip)(org.apache.nifi.schemaregistry.processors.TransformersTest)  Time elapsed: 0 sec  <<< ERROR!
      java.lang.NumberFormatException: null
      	at java.math.BigDecimal.<init>(BigDecimal.java:494)
      	at java.math.BigDecimal.<init>(BigDecimal.java:383)
      	at java.math.BigDecimal.<init>(BigDecimal.java:806)
      	at org.apache.nifi.schemaregistry.processors.CSVUtils.write(CSVUtils.java:161)
      	at org.apache.nifi.schemaregistry.processors.TransformersTest.testCSVRoundtrip(TransformersTest.java:149)
      
      
      Results :
      
      
      Tests in error:
        TransformersTest.testCSVRoundtrip:149 » NumberFormat
        TransformersTest.testCSVRoundtrip:149 » NumberFormat
        TransformersTest.testCSVRoundtrip:149 » NumberFormat
      
      
      Tests run: 14, Failures: 0, Errors: 3, Skipped: 0
      

        Issue Links

          Activity

          Hide
          githubbot ASF GitHub Bot added a comment -

          GitHub user pvillard31 opened a pull request:

          https://github.com/apache/nifi/pull/1571

          NIFI-3565 - Fixed BigDecimal instantiation and unit tests for specifi…

          …c locales

          Thank you for submitting a contribution to Apache NiFi.

          In order to streamline the review of the contribution we ask you
          to ensure the following steps have been taken:

              1. For all changes:
          • [X] Is there a JIRA ticket associated with this PR? Is it referenced
            in the commit message?
          • [X] Does your PR title start with NIFI-XXXX where XXXX is the JIRA number you are trying to resolve? Pay particular attention to the hyphen "-" character.
          • [X] Has your PR been rebased against the latest commit within the target branch (typically master)?
          • [X] Is your initial contribution a single, squashed commit?
              1. For code changes:
          • [X] Have you ensured that the full suite of tests is executed via mvn -Pcontrib-check clean install at the root nifi folder?
          • [X] Have you written or updated unit tests to verify your changes?
              1. Note:
                Please ensure that once the PR is submitted, you check travis-ci for build issues and submit an update to your PR as soon as possible.

          You can merge this pull request into a Git repository by running:

          $ git pull https://github.com/pvillard31/nifi NIFI-3565

          Alternatively you can review and apply these changes as the patch at:

          https://github.com/apache/nifi/pull/1571.patch

          To close this pull request, make a commit to your master/trunk branch
          with (at least) the following in the commit message:

          This closes #1571


          commit c0ce99244915f35e26b76bee8598aec02fa9a870
          Author: Pierre Villard <pierre.villard.fr@gmail.com>
          Date: 2017-03-07T21:28:13Z

          NIFI-3565 - Fixed BigDecimal instantiation and unit tests for specific locales


          Show
          githubbot ASF GitHub Bot added a comment - GitHub user pvillard31 opened a pull request: https://github.com/apache/nifi/pull/1571 NIFI-3565 - Fixed BigDecimal instantiation and unit tests for specifi… …c locales Thank you for submitting a contribution to Apache NiFi. In order to streamline the review of the contribution we ask you to ensure the following steps have been taken: For all changes: [X] Is there a JIRA ticket associated with this PR? Is it referenced in the commit message? [X] Does your PR title start with NIFI-XXXX where XXXX is the JIRA number you are trying to resolve? Pay particular attention to the hyphen "-" character. [X] Has your PR been rebased against the latest commit within the target branch (typically master)? [X] Is your initial contribution a single, squashed commit? For code changes: [X] Have you ensured that the full suite of tests is executed via mvn -Pcontrib-check clean install at the root nifi folder? [X] Have you written or updated unit tests to verify your changes? Note: Please ensure that once the PR is submitted, you check travis-ci for build issues and submit an update to your PR as soon as possible. You can merge this pull request into a Git repository by running: $ git pull https://github.com/pvillard31/nifi NIFI-3565 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/nifi/pull/1571.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #1571 commit c0ce99244915f35e26b76bee8598aec02fa9a870 Author: Pierre Villard <pierre.villard.fr@gmail.com> Date: 2017-03-07T21:28:13Z NIFI-3565 - Fixed BigDecimal instantiation and unit tests for specific locales
          Hide
          pvillard Pierre Villard added a comment -

          I believe that the issue also exists outside of the unit tests only: if NiFi is running on a host with a specific locale (some strange guys in France for example ), the BigDecimal instantiation could fail. The submitted PR should address both concerns.

          Show
          pvillard Pierre Villard added a comment - I believe that the issue also exists outside of the unit tests only: if NiFi is running on a host with a specific locale (some strange guys in France for example ), the BigDecimal instantiation could fail. The submitted PR should address both concerns.
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user mattyb149 commented on the issue:

          https://github.com/apache/nifi/pull/1571

          +1 LGTM, ran the unit tests with and without a locale set. Thank you, merging to master.

          Show
          githubbot ASF GitHub Bot added a comment - Github user mattyb149 commented on the issue: https://github.com/apache/nifi/pull/1571 +1 LGTM, ran the unit tests with and without a locale set. Thank you, merging to master.
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit 0b737155627533ac318f575ec4a899a36c120b88 in nifi's branch refs/heads/master from Pierre Villard
          [ https://git-wip-us.apache.org/repos/asf?p=nifi.git;h=0b73715 ]

          NIFI-3565 - Fixed BigDecimal instantiation and unit tests for specific locales

          Signed-off-by: Matt Burgess <mattyb149@apache.org>

          This closes #1571

          Show
          jira-bot ASF subversion and git services added a comment - Commit 0b737155627533ac318f575ec4a899a36c120b88 in nifi's branch refs/heads/master from Pierre Villard [ https://git-wip-us.apache.org/repos/asf?p=nifi.git;h=0b73715 ] NIFI-3565 - Fixed BigDecimal instantiation and unit tests for specific locales Signed-off-by: Matt Burgess <mattyb149@apache.org> This closes #1571
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user asfgit closed the pull request at:

          https://github.com/apache/nifi/pull/1571

          Show
          githubbot ASF GitHub Bot added a comment - Github user asfgit closed the pull request at: https://github.com/apache/nifi/pull/1571

            People

            • Assignee:
              pvillard Pierre Villard
              Reporter:
              aldrin Aldrin Piri
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development