jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Maxim <maxi...@anahoret.com>
Subject TCK issue: Closing Session in tearDown()
Date Tue, 26 Apr 2005 10:21:16 GMT
Hello jackrabbit-dev.

The most of TCK test cases closes opened sessions via Session.logout().
However there are a few test cases which do not.

Would you consider to add such code to tearDown() methods:

In files:
src/test/org/apache/jackrabbit/test/api/AbstractPropertyTest.java
src/test/org/apache/jackrabbit/test/api/SessionReadMethodsTest.java

add the following method:
-------------------------------------------------
    protected void tearDown() throws Exception {
        if (session != null) {
            session.logout();
        }
        super.tearDown();
    }
-------------------------------------------------

and in files:
src/test/org/apache/jackrabbit/test/api/ExportSysViewTest.java
src/test/org/apache/jackrabbit/test/api/ExportDocViewTest.java

add code to existing tearDown method to read:
-------------------------------------------------
    protected void tearDown() throws Exception {
        file.delete();
        if (session != null) {
            session.logout();
        }
        super.tearDown();
    }
-------------------------------------------------


Notes:

1. I'm not really sure that condition "if (session != null)" is really
necessary. Probably unconditional session.logout() will work just fine.

2. There may be other places in TCK to check for closing sessions as well.


Thank you.

-- 
Best regards, Maxim.
Anahoret Team.


Mime
View raw message