Author: stephenc
Date: Wed May 25 09:10:46 2011
New Revision: 1127446

URL: http://svn.apache.org/viewvc?rev=1127446&view=rev
Log:
Adding an annotation to mark test cases that are verifying (warts and all) 
compatibility with Plexus Utils by ensuring the same buggy behaviour

Added:
    
maven/sandbox/trunk/plexus-utils-commons-bridge/plexus-utils-tck/src/test/java/org/apache/maven/tck/ReproducesPlexusBug.java
Modified:
    
maven/sandbox/trunk/plexus-utils-commons-bridge/plexus-utils-tck/src/test/java/org/codehaus/plexus/util/IOUtilTest.java

Added: 
maven/sandbox/trunk/plexus-utils-commons-bridge/plexus-utils-tck/src/test/java/org/apache/maven/tck/ReproducesPlexusBug.java
URL: 
http://svn.apache.org/viewvc/maven/sandbox/trunk/plexus-utils-commons-bridge/plexus-utils-tck/src/test/java/org/apache/maven/tck/ReproducesPlexusBug.java?rev=1127446&view=auto
==============================================================================
--- 
maven/sandbox/trunk/plexus-utils-commons-bridge/plexus-utils-tck/src/test/java/org/apache/maven/tck/ReproducesPlexusBug.java
 (added)
+++ 
maven/sandbox/trunk/plexus-utils-commons-bridge/plexus-utils-tck/src/test/java/org/apache/maven/tck/ReproducesPlexusBug.java
 Wed May 25 09:10:46 2011
@@ -0,0 +1,17 @@
+package org.apache.maven.tck;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * This annotation marks test cases where we are testing buggy behaviour we 
will want to fix but need to reproduce
+ * to establish compatibility.
+ */
+@Retention( RetentionPolicy.RUNTIME )
+@Target( ElementType.METHOD )
+public @interface ReproducesPlexusBug
+{
+    String value();
+}

Modified: 
maven/sandbox/trunk/plexus-utils-commons-bridge/plexus-utils-tck/src/test/java/org/codehaus/plexus/util/IOUtilTest.java
URL: 
http://svn.apache.org/viewvc/maven/sandbox/trunk/plexus-utils-commons-bridge/plexus-utils-tck/src/test/java/org/codehaus/plexus/util/IOUtilTest.java?rev=1127446&r1=1127445&r2=1127446&view=diff
==============================================================================
--- 
maven/sandbox/trunk/plexus-utils-commons-bridge/plexus-utils-tck/src/test/java/org/codehaus/plexus/util/IOUtilTest.java
 (original)
+++ 
maven/sandbox/trunk/plexus-utils-commons-bridge/plexus-utils-tck/src/test/java/org/codehaus/plexus/util/IOUtilTest.java
 Wed May 25 09:10:46 2011
@@ -19,6 +19,7 @@ package org.codehaus.plexus.util;
  * under the License.
  */
 
+import org.apache.maven.tck.ReproducesPlexusBug;
 import org.junit.Test;
 
 import java.io.BufferedInputStream;
@@ -393,6 +394,7 @@ public class IOUtilTest
     }
 
     @Test( timeout = 150 )
+    @ReproducesPlexusBug( "Should not infinite loop" )
     public void toStringEmptyByteArrayZeroBufSz()
         throws Exception
     {
@@ -420,6 +422,7 @@ public class IOUtilTest
     }
 
     @Test( timeout = 150 )
+    @ReproducesPlexusBug( "Should not infinite loop" )
     public void toStringByteArrayZeroBufSz()
         throws Exception
     {
@@ -655,6 +658,7 @@ public class IOUtilTest
     }
 
     @Test( timeout = 150 )
+    @ReproducesPlexusBug( "Should not infinite loop" )
     public void toStringEmptyByteArrayValidEncodingZeroBufSz()
         throws Exception
     {
@@ -682,6 +686,7 @@ public class IOUtilTest
     }
 
     @Test( timeout = 150 )
+    @ReproducesPlexusBug( "Should not infinite loop" )
     public void toStringByteArrayValidEncodingZeroBufSz()
         throws Exception
     {
@@ -966,6 +971,7 @@ public class IOUtilTest
     }
 
     @Test( timeout = 150 )
+    @ReproducesPlexusBug( "Should not infinite loop" )
     public void copyInputStreamValidOutputStreamZeroBufSz()
         throws Exception
     {
@@ -1085,6 +1091,7 @@ public class IOUtilTest
     }
 
     @Test( timeout = 150 )
+    @ReproducesPlexusBug( "Should not infinite loop" )
     public void toStringEmptyInputStreamZeroBufSz()
         throws Exception
     {
@@ -1112,6 +1119,7 @@ public class IOUtilTest
     }
 
     @Test( timeout = 150 )
+    @ReproducesPlexusBug( "Should not infinite loop" )
     public void toStringInputStreamZeroBufSz()
         throws Exception
     {
@@ -1356,6 +1364,7 @@ public class IOUtilTest
     }
 
     @Test( timeout = 150 )
+    @ReproducesPlexusBug( "Should not infinite loop" )
     public void toStringEmptyInputStreamValidEncodingZeroBufSz()
         throws Exception
     {
@@ -1383,6 +1392,7 @@ public class IOUtilTest
     }
 
     @Test( timeout = 150 )
+    @ReproducesPlexusBug( "Should not infinite loop" )
     public void toStringInputStreamValidEncodingZeroBufSz()
         throws Exception
     {


Reply via email to