You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by br...@apache.org on 2005/08/26 09:46:18 UTC

svn commit: r240180 - in /maven/components/trunk/maven-plugins/maven-eclipse-plugin/src/test: java/org/apache/maven/plugin/eclipse/EclipsePluginTest.java projects/project-4/project

Author: brett
Date: Fri Aug 26 00:46:12 2005
New Revision: 240180

URL: http://svn.apache.org/viewcvs?rev=240180&view=rev
Log:
fix tests:
- ordering of link elements was wrong
- windows path separator was wrong

Modified:
    maven/components/trunk/maven-plugins/maven-eclipse-plugin/src/test/java/org/apache/maven/plugin/eclipse/EclipsePluginTest.java
    maven/components/trunk/maven-plugins/maven-eclipse-plugin/src/test/projects/project-4/project

Modified: maven/components/trunk/maven-plugins/maven-eclipse-plugin/src/test/java/org/apache/maven/plugin/eclipse/EclipsePluginTest.java
URL: http://svn.apache.org/viewcvs/maven/components/trunk/maven-plugins/maven-eclipse-plugin/src/test/java/org/apache/maven/plugin/eclipse/EclipsePluginTest.java?rev=240180&r1=240179&r2=240180&view=diff
==============================================================================
--- maven/components/trunk/maven-plugins/maven-eclipse-plugin/src/test/java/org/apache/maven/plugin/eclipse/EclipsePluginTest.java (original)
+++ maven/components/trunk/maven-plugins/maven-eclipse-plugin/src/test/java/org/apache/maven/plugin/eclipse/EclipsePluginTest.java Fri Aug 26 00:46:12 2005
@@ -135,7 +135,7 @@
             // replace some vars in the expected line, to account
             // for absolute paths that are different on each installation.
 
-            expected = StringUtils.replace( expected, "${basedir}", basedir );
+            expected = StringUtils.replace( expected, "${basedir}", basedir.replace( '\\', '/' ) );
 
             if ( actualLines.size() < i )
             {

Modified: maven/components/trunk/maven-plugins/maven-eclipse-plugin/src/test/projects/project-4/project
URL: http://svn.apache.org/viewcvs/maven/components/trunk/maven-plugins/maven-eclipse-plugin/src/test/projects/project-4/project?rev=240180&r1=240179&r2=240180&view=diff
==============================================================================
--- maven/components/trunk/maven-plugins/maven-eclipse-plugin/src/test/projects/project-4/project (original)
+++ maven/components/trunk/maven-plugins/maven-eclipse-plugin/src/test/projects/project-4/project Fri Aug 26 00:46:12 2005
@@ -18,11 +18,6 @@
       <location>${basedir}/src/test/projects/project-4/project.xml</location>
     </link>
     <link>
-      <name>src-main-java</name>
-      <type>2</type>
-      <location>${basedir}/src/test/projects/project-4/src/main/java</location>
-    </link>
-    <link>
       <name>src-test-resources</name>
       <type>2</type>
       <location>${basedir}/src/test/projects/project-4/src/test/resources</location>
@@ -36,6 +31,11 @@
       <name>src-main-resources</name>
       <type>2</type>
       <location>${basedir}/src/test/projects/project-4/src/main/resources</location>
+    </link>
+    <link>
+      <name>src-main-java</name>
+      <type>2</type>
+      <location>${basedir}/src/test/projects/project-4/src/main/java</location>
     </link>
   </linkedResources>
 </projectDescription>



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


Re: svn commit: r240180 - in /maven/components/trunk/maven-plugins/maven-eclipse-plugin/src/test: java/org/apache/maven/plugin/eclipse/EclipsePluginTest.java projects/project-4/project

Posted by Brett Porter <br...@apache.org>.
Yes, sorry - I didn't realise that until I committed the change and it
passed on Windows but not linux :) I made an assumption since there was
only one element out of "order".

I've made it order correctly now.

- Brett

Kenney Westerhof wrote:

>On Fri, 26 Aug 2005 brett@apache.org wrote:
>
>The ordering of the link elements was not wrong, because the
>test passed here before I committed.
>
>The problem is that it uses a HashMap and iterates over the keys.
>This is nondeterministic. Guess the memory profile has changed because of
>your other changes and now the order is different. Might even fail
>on different jvm versions.. i'll modify to keep a fixed ordering
>so the tests don't fail.
>
>  
>
>>Author: brett
>>Date: Fri Aug 26 00:46:12 2005
>>New Revision: 240180
>>
>>URL: http://svn.apache.org/viewcvs?rev=240180&view=rev
>>Log:
>>fix tests:
>>- ordering of link elements was wrong
>>- windows path separator was wrong
>>
>>Modified:
>>    maven/components/trunk/maven-plugins/maven-eclipse-plugin/src/test/java/org/apache/maven/plugin/eclipse/EclipsePluginTest.java
>>    maven/components/trunk/maven-plugins/maven-eclipse-plugin/src/test/projects/project-4/project
>>
>>Modified: maven/components/trunk/maven-plugins/maven-eclipse-plugin/src/test/java/org/apache/maven/plugin/eclipse/EclipsePluginTest.java
>>URL: http://svn.apache.org/viewcvs/maven/components/trunk/maven-plugins/maven-eclipse-plugin/src/test/java/org/apache/maven/plugin/eclipse/EclipsePluginTest.java?rev=240180&r1=240179&r2=240180&view=diff
>>==============================================================================
>>--- maven/components/trunk/maven-plugins/maven-eclipse-plugin/src/test/java/org/apache/maven/plugin/eclipse/EclipsePluginTest.java (original)
>>+++ maven/components/trunk/maven-plugins/maven-eclipse-plugin/src/test/java/org/apache/maven/plugin/eclipse/EclipsePluginTest.java Fri Aug 26 00:46:12 2005
>>@@ -135,7 +135,7 @@
>>             // replace some vars in the expected line, to account
>>             // for absolute paths that are different on each installation.
>>
>>-            expected = StringUtils.replace( expected, "${basedir}", basedir );
>>+            expected = StringUtils.replace( expected, "${basedir}", basedir.replace( '\\', '/' ) );
>>
>>             if ( actualLines.size() < i )
>>             {
>>
>>Modified: maven/components/trunk/maven-plugins/maven-eclipse-plugin/src/test/projects/project-4/project
>>URL: http://svn.apache.org/viewcvs/maven/components/trunk/maven-plugins/maven-eclipse-plugin/src/test/projects/project-4/project?rev=240180&r1=240179&r2=240180&view=diff
>>==============================================================================
>>--- maven/components/trunk/maven-plugins/maven-eclipse-plugin/src/test/projects/project-4/project (original)
>>+++ maven/components/trunk/maven-plugins/maven-eclipse-plugin/src/test/projects/project-4/project Fri Aug 26 00:46:12 2005
>>@@ -18,11 +18,6 @@
>>       <location>${basedir}/src/test/projects/project-4/project.xml</location>
>>     </link>
>>     <link>
>>-      <name>src-main-java</name>
>>-      <type>2</type>
>>-      <location>${basedir}/src/test/projects/project-4/src/main/java</location>
>>-    </link>
>>-    <link>
>>       <name>src-test-resources</name>
>>       <type>2</type>
>>       <location>${basedir}/src/test/projects/project-4/src/test/resources</location>
>>@@ -36,6 +31,11 @@
>>       <name>src-main-resources</name>
>>       <type>2</type>
>>       <location>${basedir}/src/test/projects/project-4/src/main/resources</location>
>>+    </link>
>>+    <link>
>>+      <name>src-main-java</name>
>>+      <type>2</type>
>>+      <location>${basedir}/src/test/projects/project-4/src/main/java</location>
>>     </link>
>>   </linkedResources>
>> </projectDescription>
>>
>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
>>For additional commands, e-mail: dev-help@maven.apache.org
>>
>>    
>>
>
>--
>Kenney Westerhof
>http://www.neonics.com
>GPG public key: http://www.gods.nl/~forge/kenneyw.key
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
>For additional commands, e-mail: dev-help@maven.apache.org
>
>
>  
>


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


Re: svn commit: r240180 - in /maven/components/trunk/maven-plugins/maven-eclipse-plugin/src/test: java/org/apache/maven/plugin/eclipse/EclipsePluginTest.java projects/project-4/project

Posted by Kenney Westerhof <fo...@neonics.com>.
On Fri, 26 Aug 2005 brett@apache.org wrote:

The ordering of the link elements was not wrong, because the
test passed here before I committed.

The problem is that it uses a HashMap and iterates over the keys.
This is nondeterministic. Guess the memory profile has changed because of
your other changes and now the order is different. Might even fail
on different jvm versions.. i'll modify to keep a fixed ordering
so the tests don't fail.

> Author: brett
> Date: Fri Aug 26 00:46:12 2005
> New Revision: 240180
>
> URL: http://svn.apache.org/viewcvs?rev=240180&view=rev
> Log:
> fix tests:
> - ordering of link elements was wrong
> - windows path separator was wrong
>
> Modified:
>     maven/components/trunk/maven-plugins/maven-eclipse-plugin/src/test/java/org/apache/maven/plugin/eclipse/EclipsePluginTest.java
>     maven/components/trunk/maven-plugins/maven-eclipse-plugin/src/test/projects/project-4/project
>
> Modified: maven/components/trunk/maven-plugins/maven-eclipse-plugin/src/test/java/org/apache/maven/plugin/eclipse/EclipsePluginTest.java
> URL: http://svn.apache.org/viewcvs/maven/components/trunk/maven-plugins/maven-eclipse-plugin/src/test/java/org/apache/maven/plugin/eclipse/EclipsePluginTest.java?rev=240180&r1=240179&r2=240180&view=diff
> ==============================================================================
> --- maven/components/trunk/maven-plugins/maven-eclipse-plugin/src/test/java/org/apache/maven/plugin/eclipse/EclipsePluginTest.java (original)
> +++ maven/components/trunk/maven-plugins/maven-eclipse-plugin/src/test/java/org/apache/maven/plugin/eclipse/EclipsePluginTest.java Fri Aug 26 00:46:12 2005
> @@ -135,7 +135,7 @@
>              // replace some vars in the expected line, to account
>              // for absolute paths that are different on each installation.
>
> -            expected = StringUtils.replace( expected, "${basedir}", basedir );
> +            expected = StringUtils.replace( expected, "${basedir}", basedir.replace( '\\', '/' ) );
>
>              if ( actualLines.size() < i )
>              {
>
> Modified: maven/components/trunk/maven-plugins/maven-eclipse-plugin/src/test/projects/project-4/project
> URL: http://svn.apache.org/viewcvs/maven/components/trunk/maven-plugins/maven-eclipse-plugin/src/test/projects/project-4/project?rev=240180&r1=240179&r2=240180&view=diff
> ==============================================================================
> --- maven/components/trunk/maven-plugins/maven-eclipse-plugin/src/test/projects/project-4/project (original)
> +++ maven/components/trunk/maven-plugins/maven-eclipse-plugin/src/test/projects/project-4/project Fri Aug 26 00:46:12 2005
> @@ -18,11 +18,6 @@
>        <location>${basedir}/src/test/projects/project-4/project.xml</location>
>      </link>
>      <link>
> -      <name>src-main-java</name>
> -      <type>2</type>
> -      <location>${basedir}/src/test/projects/project-4/src/main/java</location>
> -    </link>
> -    <link>
>        <name>src-test-resources</name>
>        <type>2</type>
>        <location>${basedir}/src/test/projects/project-4/src/test/resources</location>
> @@ -36,6 +31,11 @@
>        <name>src-main-resources</name>
>        <type>2</type>
>        <location>${basedir}/src/test/projects/project-4/src/main/resources</location>
> +    </link>
> +    <link>
> +      <name>src-main-java</name>
> +      <type>2</type>
> +      <location>${basedir}/src/test/projects/project-4/src/main/java</location>
>      </link>
>    </linkedResources>
>  </projectDescription>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>

--
Kenney Westerhof
http://www.neonics.com
GPG public key: http://www.gods.nl/~forge/kenneyw.key

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org