new PooledConnection[pool.getMaxConnections()];
new PooledConnection[pool.getMaxPoolSize()];
    public void testBlocking() throws Exception {                pool.setBlockingTimeout(2 * 1000);                try {            PooledConnection[] connections =                 new PooledConnection[pool.getMaxConnections()];                            // take all connections, so next access will block            for (int i = 0; i < connections.length; i++) {    			connections[i] = pool.getPooledConnection();    		}                        class BlockingTester implements Runnable {                private boolean failedOnTimeout;                private long duration;                                public void run() {                    PooledConnection connection = null;                    long start = System.currentTimeMillis();                    try {                                                connection = pool.getPooledConnection();                                                // set duration to zero, to indicate incorrect behavior                        duration = 0;                    } catch(SQLException ex) {                                                //everything is fine                        failedOnTimeout = true;                        duration = System.currentTimeMillis() - start;                                            } finally {                        try {                            if (connection != null)                                connection.close();                        } catch(SQLException ex) {                            // do nothing                        }                    }                }            };                        BlockingTester tester = new BlockingTester();                        Thread t = new Thread(tester, "BlockingTester");            t.start();                        // sleep for blocking timeout + 1 sec.            //Thread.sleep(pool.getBlockingTimeout() + 1000);            t.join();                        assertTrue("Blocked thread should have failed on timeout.",                 tester.failedOnTimeout);                            assertTrue("Exception should not have been thrown too early.",                 tester.duration >= pool.getBlockingTimeout());        } finally {            pool.shutdown();            }    }