db-jdo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Craig Russell (JIRA)" <j...@apache.org>
Subject [jira] Commented: (JDO-335) Close PMF after running each configuration
Date Mon, 13 Mar 2006 16:38:58 GMT
    [ http://issues.apache.org/jira/browse/JDO-335?page=comments#action_12370203 ] 

Craig Russell commented on JDO-335:
-----------------------------------

IIUC, the only place that close() will be called now is here:

+    /** Runs the specified test and close the pmf. */
+    public TestResult doRun(Test test) {
+        TestResult result = doRun(test, false);
+        JDO_Test.closePMF();
+        return result;
+    }

The question is whether doRun(test, false) will ever throw an exception, causing the closePMF
call to be bypassed.

One other point. While looking at this method, I was wondering whether the PMF would be closed
when running the test from maven, i.e. using the TestSuite procedure. It wasn't clear that
this method is also invoked when running via TestSuite. I think a javadoc comment that this
method is used for both TestCase and TestSuite would be nice.

+    /** Runs the specified test or test suite and closes the pmf. */


> Close PMF after running each configuration
> ------------------------------------------
>
>          Key: JDO-335
>          URL: http://issues.apache.org/jira/browse/JDO-335
>      Project: JDO
>         Type: Improvement
>   Components: tck20
>     Versions: JDO 2 rc1
>     Reporter: Michael Bouschen
>     Assignee: Michael Bouschen
>     Priority: Minor
>      Fix For: JDO 2 final
>  Attachments: JDO-335-2.patch, JDO-335.patch
>
> Today method tearDown (that is run at the end of each test method) closes the pmf. 
> The proposal is to keep the pmf open for the next test method and close it at the end
of running a configuration. That would allow to reuse resources bound to the pmf in multiple
test cases.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


Mime
View raw message