public static void runTest2() throws Exception {
    try {
      logger.debug("runTest2 sleeping");
      WaitCriterion ev = new WaitCriterion() {
        @Override
        public boolean done() {
          return runTest1Ready;
        }

        @Override
        public String description() {
          return null;
        }
      };
      GeodeAwaitility.await().untilAsserted(ev);

      DataSource ds = null;
      try {
        Context ctx = cache.getJNDIContext();
        ds = (DataSource) ctx.lookup("java:/XAPooledDataSource");
      } catch (NamingException e) {
        logger.debug("Exception caught during naming lookup: " + e);
        fail("failed in naming lookup: " + e);
      } catch (Exception e) {
        logger.debug("Exception caught during naming lookup: " + e);
        fail("failed in because of unhandled excpetion: " + e);
      }
      try {
        logger.debug("runTest2 about to acquire connection ");
        ds.getConnection();
        fail("expected a Login time-out exceeded");
      } catch (SQLException sqle) {
        if (sqle.getMessage().indexOf("Login time-out exceeded") == -1) {
          logger.debug("Exception caught in runTest2:", sqle);
          fail("failed because of unhandled exception : " + sqle);
        }
      } catch (Exception e) {
        logger.debug("Exception caught in runTest2:", e);
        fail("failed because of unhandled exception : " + e);
      }
    } finally {
      // allow runtest1 to exit
      runTest2Done = true;
    }
  }
Return file as string and then modify the string accordingly **
geode-core/src/distributedTest/java/org/apache/geode/internal/jta/dunit/LoginTimeOutDUnitTest.java