[ 
https://issues.apache.org/jira/browse/DERBY-2087?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12466738
 ] 

Julius Stroffek commented on DERBY-2087:
----------------------------------------

I extended some off the comments and added one more parameter to 
singleUseDatabaseDecorator(Test test, String dbName, boolean defaultDb) 
indicating whether the passed dbName should be a default database.

Currently, the TestConfiguration manages a list of databases in use in a 
usedDbNames property. The singleUseDatabaseDecorator creates a new 
configuration and appends a passed (or generated) database name at the end of 
the old database list. Optionally, if specified, the default database might be 
also changed.

The DropDatabaseSetup will delete only the last database in the list at 
tearDown.

The added singleUseDatabaseDecorator has nothing common with a singleUse 
folder. Shall I change it to create databases in that folder?

I ran all junit and harness tests again. lang/subquery.sql test failed in 
derbyall, when I ran it again multiple times it succeeded every time.

I also added a check to TestConfiguration.openConnection method. The passed 
database name have to exist in the list of used databases otherwise an 
exception is thrown.

If there is still something to do please let me now.

> Clean up of a database server directory after running junit tests.
> ------------------------------------------------------------------
>
>                 Key: DERBY-2087
>                 URL: https://issues.apache.org/jira/browse/DERBY-2087
>             Project: Derby
>          Issue Type: Improvement
>          Components: Test
>    Affects Versions: 10.3.0.0
>            Reporter: Julius Stroffek
>         Assigned To: Julius Stroffek
>            Priority: Minor
>             Fix For: 10.3.0.0
>
>         Attachments: d2087.diff, d2087.stat, d2087_try2.diff, d2087_try2.stat
>
>
> If I create a test using multiple connections using code like this 
>       DataSource ds1 = JDBCDataSource.getDataSource("FIRSTDB1");
>       JDBCDataSource.setBeanProperty(ds1, "connectionAttributes", 
> "create=true");
>       Connection conn1 = ds1.getConnection();
> the files created on a server does not get cleaned.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to