You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "Pierre Villard (JIRA)" <ji...@apache.org> on 2017/03/06 19:49:33 UTC

[jira] [Resolved] (NIFI-2683) Tests rely on locale

     [ https://issues.apache.org/jira/browse/NIFI-2683?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Pierre Villard resolved NIFI-2683.
----------------------------------
    Resolution: Duplicate
      Assignee: Pierre Villard

Closing in favor of NIFI-3483.

> Tests rely on locale
> --------------------
>
>                 Key: NIFI-2683
>                 URL: https://issues.apache.org/jira/browse/NIFI-2683
>             Project: Apache NiFi
>          Issue Type: Bug
>          Components: Core Framework
>    Affects Versions: 1.0.0
>         Environment: Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 2015-11-10T17:41:47+01:00)
> Java version: 1.8.0_74, vendor: Oracle Corporation
> Default locale: fr_FR, platform encoding: Cp1252
> OS name: "windows 10", version: "10.0", arch: "amd64", family: "dos"
>            Reporter: Pierre Villard
>            Assignee: Pierre Villard
>            Priority: Minor
>
> The following test fails because of the locale language.
> {noformat}
> Failed tests:
>   StandardHttpResponseMergerSpec.MergeResponses: #responseEntities.size() HTTP 200 #httpMethod responses for #requestUriPart:123 Condition not satisfied:
> returnedJson == expectedJson
> |            |  |
> |            |  {"id":"1","permissions":{"canRead":false,"canWrite":false},"status":{"aggregateSnapshot":{"flowFilesIn":0,"bytesIn":1000,"input":"0 (1,000 bytes)","flowFilesOut":0,"bytesOut":0,"output":"
> 0 (0 bytes)","flowFilesQueued":0,"bytesQueued":0,"queued":"0 (0 bytes)","queuedSize":"0 bytes","queuedCount":"0"}}}
> |            false
> |            1 difference (99% similarity)
> |            {"id":"1","permissions":{"canRead":false,"canWrite":false},"status":{"aggregateSnapshot":{"flowFilesIn":0,"bytesIn":1000,"input":"0 (1( )000 bytes)","flowFilesOut":0,"bytesOut":0,"output":"0
>  (0 bytes)","flowFilesQueued":0,"bytesQueued":0,"queued":"0 (0 bytes)","queuedSize":"0 bytes","queuedCount":"0"}}}
> |            {"id":"1","permissions":{"canRead":false,"canWrite":false},"status":{"aggregateSnapshot":{"flowFilesIn":0,"bytesIn":1000,"input":"0 (1(,)000 bytes)","flowFilesOut":0,"bytesOut":0,"output":"0
>  (0 bytes)","flowFilesQueued":0,"bytesQueued":0,"queued":"0 (0 bytes)","queuedSize":"0 bytes","queuedCount":"0"}}}
> {"id":"1","permissions":{"canRead":false,"canWrite":false},"status":{"aggregateSnapshot":{"flowFilesIn":0,"bytesIn":1000,"input":"0 (1 000 bytes)","flowFilesOut":0,"bytesOut":0,"output":"0 (0 bytes)","fl
> owFilesQueued":0,"bytesQueued":0,"q
> {noformat}
> An easy option is to have a little change in the main pom.xml:
> {noformat}
>                 <plugin>
>                     <groupId>org.apache.maven.plugins</groupId>
>                     <artifactId>maven-surefire-plugin</artifactId>
>                     <version>2.18</version>
>                     <configuration>
>                         <includes>
>                             <include>**/*Test.class</include>
>                             <include>**/Test*.class</include>
>                             <include>**/*Spec.class</include>
>                         </includes>
>                         <redirectTestOutputToFile>true</redirectTestOutputToFile>
>                         <argLine combine.children="append">-Xmx1G -Djava.net.preferIPv4Stack=true -Duser.language=en -Duser.region=US</argLine>
>                     </configuration>
>                     <dependencies>
>                         <dependency>
>                             <!-- Force surefire to use JUnit -->
>                             <groupId>org.apache.maven.surefire</groupId>
>                             <artifactId>surefire-junit4</artifactId>
>                             <version>2.18</version>
>                         </dependency>
>                     </dependencies>
>                 </plugin>
> {noformat}
> otherwise the test needs to be changed.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)