Uploaded image for project: 'Jackrabbit Content Repository'
  1. Jackrabbit Content Repository
  2. JCR-495

TCK: SessionReadMethodsTest#testIsLive calls logout() more than once

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.1
    • test
    • None

    Description

      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();

      Attachments

        Activity

          People

            Unassigned Unassigned
            npombourcq Nicolas Pombourcq
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: