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

A test in TestVersionedFlowSnapshotMetadataResult fails because it depends on locale

    XMLWordPrintableJSON

Details

    • Test
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 1.8.0
    • None
    • None

    Description

      Test testWriteSimpleVersionedFlowSnapshotResult in TestVersionedFlowSnapshotMetadataResult class fails with an assertion error when the locale is not "en_US" (or similar locale). When the locale is "ja_JP", the test fails as follows:

      [INFO] Running org.apache.nifi.toolkit.cli.impl.result.TestVersionedFlowSnapshotMetadataResult
      [ERROR] Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.028 s <<< FAILURE! - in org.apache.nifi.toolkit.cli.impl.result.TestVersionedFlowSnapshotMetadataResult
      [ERROR] testWriteSimpleVersionedFlowSnapshotResult(org.apache.nifi.toolkit.cli.impl.result.TestVersionedFlowSnapshotMetadataResult)  Time elapsed: 0.027 s  <<< FAILURE!
      java.lang.AssertionError
              at org.apache.nifi.toolkit.cli.impl.result.TestVersionedFlowSnapshotMetadataResult.testWriteSimpleVersionedFlowSnapshotResult(TestVersionedFlowSnapshotMetadataResult.java:79)
      

      The content of resultOut is now:

      Ver   Date                     Author   Message                                    
      ---   ----------------------   ------   ----------------------------------------   
      1     水, 2 14 2018 12:00 JST   user1    This is a long comment, longer than t...   
      2     水, 2 14 2018 12:30 JST   user2    This is v2                                 
      
      

      Even if checking the heading two lines (as we do now), length of a line is different by each locale because width of columns depends on locale. We can deal with this problem using regex.

      Attachments

        Issue Links

          Activity

            People

              kotarot Kotaro Terada
              kotarot Kotaro Terada
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: