// the pool is now loaded with one connection which will throw an exception when closed
Thread.sleep(1100); // leave enough time for the ide connections to expire
TransactionManagerServices.getTaskScheduler().interrupt(); // wake up the task scheduler
Thread.sleep(100); // leave enough time for the scheduled shrinking task to do its work
assertEquals(1, pool.inPoolSize());
MockitoXADataSource.setStaticGetXAConnectionException(new SQLException("getXAConnection fails because datasource broken"));
Thread.sleep(1100); // leave enough time for the ide connections to expire
TransactionManagerServices.getTaskScheduler().interrupt(); // wake up the task scheduler
Thread.sleep(100); // leave enough time for the scheduled shrinking task to do its work