commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rwaldh...@apache.org
Subject cvs commit: jakarta-commons/dbcp/src/test/org/apache/commons/dbcp/jdbc2pool TestJdbc2PoolDataSource.java
Date Thu, 06 Mar 2003 21:41:47 GMT
rwaldhoff    2003/03/06 13:41:47

  Modified:    dbcp/src/test/org/apache/commons/dbcp
                        TestConnectionPool.java
               dbcp/src/test/org/apache/commons/dbcp/jdbc2pool
                        TestJdbc2PoolDataSource.java
  Log:
  remove unneccessary calls to Thread.currentThread()
  
  Revision  Changes    Path
  1.4       +7 -7      jakarta-commons/dbcp/src/test/org/apache/commons/dbcp/TestConnectionPool.java
  
  Index: TestConnectionPool.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/dbcp/src/test/org/apache/commons/dbcp/TestConnectionPool.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- TestConnectionPool.java	8 Nov 2002 19:37:26 -0000	1.3
  +++ TestConnectionPool.java	6 Mar 2003 21:41:47 -0000	1.4
  @@ -367,7 +367,7 @@
           for(int i=0;i<threads.length;i++) {
               while(!(threads[i]).complete()) {
                   try {
  -                    Thread.currentThread().sleep(100L);
  +                    Thread.sleep(100L);
                   } catch(Exception e) {
                       // ignored
                   }
  @@ -408,7 +408,7 @@
           public void run() {
               for(int i=0;i<_iter;i++) {
                   try {
  -                    Thread.currentThread().sleep((long)_random.nextInt(_delay));
  +                    Thread.sleep((long)_random.nextInt(_delay));
                   } catch(Exception e) {
                       // ignored
                   }
  @@ -420,7 +420,7 @@
                       stmt = conn.prepareStatement("select 'literal', SYSDATE from dual");
                       rset = stmt.executeQuery();
                       try {
  -                        Thread.currentThread().sleep((long)_random.nextInt(_delay));
  +                        Thread.sleep((long)_random.nextInt(_delay));
                       } catch(Exception e) {
                           // ignored
                       }
  
  
  
  1.5       +7 -7      jakarta-commons/dbcp/src/test/org/apache/commons/dbcp/jdbc2pool/TestJdbc2PoolDataSource.java
  
  Index: TestJdbc2PoolDataSource.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/dbcp/src/test/org/apache/commons/dbcp/jdbc2pool/TestJdbc2PoolDataSource.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- TestJdbc2PoolDataSource.java	16 Nov 2002 19:18:27 -0000	1.4
  +++ TestJdbc2PoolDataSource.java	6 Mar 2003 21:41:47 -0000	1.5
  @@ -347,7 +347,7 @@
           for (int i = 0; i < pts.length; i++) {
               pts[i] = new PoolTest(threadGroup, holdTime);
           }
  -        Thread.currentThread().sleep(10 * holdTime);
  +        Thread.sleep(10 * holdTime);
           for (int i = 0; i < pts.length; i++) {
               pts[i].stop();
           }
  @@ -355,7 +355,7 @@
           // - (pts.length*10*holdTime);
           System.out.println("Multithread test time = " + time + " ms");
   
  -        Thread.currentThread().sleep(holdTime);
  +        Thread.sleep(holdTime);
           return success[0];
       }
   
  @@ -396,7 +396,7 @@
                       assertTrue(null != rset);
                       assertTrue(rset.next());
                       state = "Holding Connection";
  -                    thread.sleep(connHoldTime);
  +                    Thread.sleep(connHoldTime);
                       state = "Returning Connection";
                       rset.close();
                       stmt.close();
  
  
  

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


Mime
View raw message