db-jdo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From m..@apache.org
Subject svn commit: r387917 - /db/jdo/trunk/tck20/src/java/org/apache/jdo/tck/util/BatchTestRunner.java
Date Wed, 22 Mar 2006 19:22:33 GMT
Author: mbo
Date: Wed Mar 22 11:22:29 2006
New Revision: 387917

URL: http://svn.apache.org/viewcvs?rev=387917&view=rev
Log:
JDO-335: call closePMF in finally block

Modified:
    db/jdo/trunk/tck20/src/java/org/apache/jdo/tck/util/BatchTestRunner.java

Modified: db/jdo/trunk/tck20/src/java/org/apache/jdo/tck/util/BatchTestRunner.java
URL: http://svn.apache.org/viewcvs/db/jdo/trunk/tck20/src/java/org/apache/jdo/tck/util/BatchTestRunner.java?rev=387917&r1=387916&r2=387917&view=diff
==============================================================================
--- db/jdo/trunk/tck20/src/java/org/apache/jdo/tck/util/BatchTestRunner.java (original)
+++ db/jdo/trunk/tck20/src/java/org/apache/jdo/tck/util/BatchTestRunner.java Wed Mar 22 11:22:29
2006
@@ -90,7 +90,7 @@
         run(new TestSuite(clazz));
     }
     
-    /** Runs the specified test. */
+    /** Runs the specified test or test suite */
     public static TestResult run(Test test) {
         return new BatchTestRunner().doRun(test);
     }
@@ -100,11 +100,15 @@
         new BatchTestRunner().doRun(suite, true);
     }
 
-    /** Runs the specified test and close the pmf. */
+    /** Runs the specified test or test suite and closes the pmf. */
     public TestResult doRun(Test test) {
-        TestResult result = doRun(test, false);
-        JDO_Test.dumpSupportedOptions(LOG_DIRECTORY + "configuration");
-        JDO_Test.closePMF();
+        TestResult result = null;
+        try {
+            result = doRun(test, false);
+            JDO_Test.dumpSupportedOptions(LOG_DIRECTORY + "configuration");
+        } finally {
+            JDO_Test.closePMF();
+        }
         return result;
     }
 



Mime
View raw message