public static void runTest2() throws Exception {
    final int MAX_CONNECTIONS = 30;
    // getLogWriter().info("runTest2 sleeping for 20 sec");
    // Thread.sleep(20 * 1000);
    DataSource ds = null;
    try {
      Context ctx = cache.getJNDIContext();
      ds = (DataSource) ctx.lookup("java:/XAPooledDataSource");
    } catch (NamingException e) {
      LogWriterUtils.getLogWriter().info("Exception caught during naming lookup: " + e);
      fail("failed in naming lookup: " + e);
      return;
    } catch (Exception e) {
      LogWriterUtils.getLogWriter().info("Exception caught during naming lookup: " + e);
      fail("failed in because of unhandled excpetion: " + e);
      return;
    }
    try {
      for (int count = 0; count < MAX_CONNECTIONS; count++) {
        Connection con = ds.getConnection();
        assertNotNull("Connection object is null", con);
        LogWriterUtils.getLogWriter().info("runTest2 :acquired connection #" + count);
      }
    } catch (SQLException sqle) {
      LogWriterUtils.getLogWriter().info("SQLException caught in runTest2: " + sqle);
      fail("failed because of SQL exception : " + sqle);
      sqle.printStackTrace();
    } catch (Exception e) {
      LogWriterUtils.getLogWriter().info("Exception caught in runTest2: " + e);
      fail("failed because of unhandled exception : " + e);
      e.printStackTrace();
    }
  }
Return file as string and then modify the string accordingly **
geode-core/src/distributedTest/java/org/apache/geode/internal/jta/dunit/IdleTimeOutDUnitTest.java