jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nicolas Pombourcq (JIRA)" <j...@apache.org>
Subject [jira] Created: (JCR-495) TCK: SessionReadMethodsTest#testIsLive calls logout() more than once
Date Tue, 25 Jul 2006 21:12:13 GMT
TCK: SessionReadMethodsTest#testIsLive calls logout() more than once
--------------------------------------------------------------------

                 Key: JCR-495
                 URL: http://issues.apache.org/jira/browse/JCR-495
             Project: Jackrabbit
          Issue Type: Bug
          Components: test
            Reporter: Nicolas Pombourcq


SessionReadMethodsTest#testIsLive calls logout more than once in a session (once in the test,
once in tearDown).  JSR-170 doesn't prohibit an implementation from throwing an unchecked
exception (such as IllegalStateException) if logout is called more than once.

Proposal: change tearDown to test isLive before calling logout.

--- SessionReadMethodsTest.java (revision 422074)
+++ SessionReadMethodsTest.java (working copy)
@@ -57,7 +57,7 @@
      * Releases the session aquired in {@link #setUp()}.
      */
     protected void tearDown() throws Exception {
-        if (session != null) {
+        if (session != null && session.isLive()) {
             session.logout();
         }
         super.tearDown();


-- 
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