Author: markt
Date: Sat Jan 19 08:49:52 2013
New Revision: 1435505

URL: http://svn.apache.org/viewvc?rev=1435505&view=rev
Log:
Convert to JUnit 4

Modified:
    
tomcat/trunk/modules/jdbc-pool/src/test/java/org/apache/tomcat/jdbc/test/TestSizePreservation.java

Modified: 
tomcat/trunk/modules/jdbc-pool/src/test/java/org/apache/tomcat/jdbc/test/TestSizePreservation.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/modules/jdbc-pool/src/test/java/org/apache/tomcat/jdbc/test/TestSizePreservation.java?rev=1435505&r1=1435504&r2=1435505&view=diff
==============================================================================
--- 
tomcat/trunk/modules/jdbc-pool/src/test/java/org/apache/tomcat/jdbc/test/TestSizePreservation.java
 (original)
+++ 
tomcat/trunk/modules/jdbc-pool/src/test/java/org/apache/tomcat/jdbc/test/TestSizePreservation.java
 Sat Jan 19 08:49:52 2013
@@ -19,18 +19,18 @@ package org.apache.tomcat.jdbc.test;
 import java.sql.Connection;
 import java.util.concurrent.atomic.AtomicInteger;
 
-import junit.framework.TestCase;
+import org.junit.Assert;
+import org.junit.Test;
 
 import org.apache.tomcat.jdbc.pool.DataSource;
 import org.apache.tomcat.jdbc.pool.PoolConfiguration;
 import org.apache.tomcat.jdbc.test.driver.Driver;
+
 /**
- *
  * @author Jeremy Norris
  * https://issues.apache.org/bugzilla/show_bug.cgi?id=50613
- *
  */
-public class TestSizePreservation extends TestCase {
+public class TestSizePreservation {
 
     protected volatile DataSource ds = null;
 
@@ -71,6 +71,7 @@ public class TestSizePreservation extend
         ds.getPoolProperties().setRemoveAbandonedTimeout(1);
     }
 
+    @Test
     public void testSimple() throws Exception {
         initSimplePoolProperties();
         common();
@@ -78,6 +79,7 @@ public class TestSizePreservation extend
         Driver.reset();
     }
 
+    @Test
     public void testEvicting() throws Exception {
         initEvictingPool();
         common();
@@ -122,7 +124,7 @@ public class TestSizePreservation extend
             threads[i].join();
         }
         System.out.println("Pool size:"+ds.getPool().getSize());
-        assertTrue("Size validity check: ", ds.getPool().getSize() >= 0);
+        Assert.assertTrue("Size validity check: ", ds.getPool().getSize() >= 
0);
     }
 
 }



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to