db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mike Matrigali (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (DERBY-5977) Run storemore and possibly other store .sql tests in junit harness using ScriptTest mechanism.
Date Fri, 08 Feb 2013 00:07:13 GMT

    [ https://issues.apache.org/jira/browse/DERBY-5977?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13574081#comment-13574081

Mike Matrigali commented on DERBY-5977:

at one point in the databaseProperties test it sets that SYSTEM pageSize.  This is likely
causing at least some of the problems.  Best would be to change the
test to unset the system property after it does the test it is trying to do.  I don't see
an existing utility, so may need to add one. 

Do you know in the new environment if the test is run with autocommit on or off?  I would
suggest running the test with autocommit off and then run an abort at the end
of the script.  

 Here is a web hit on how to delete
a system property:

How to Remove a System Property

I thought I could remove a system property by setting its value to null, but it turns out
that System.setProperty(key, val) will throw NullPointerException when either key or value
is null. Here are 2 ways to remove or clear a system property:

1. clearProperty(String key) introduced in JDK 1.5.

Properties sysProps = System.getProperties();
When java security manager is enabled, Both methods need specific permissions to succeed.
Approach 1 requires PropertyPermission "key", "read,write". Approach 2 requires a much wider
permission: PropertyPermission "*", "read,write", because you are free to modify/remove all
system properties with the returned object from System.getProperties()
> Run storemore and possibly other store .sql tests in junit harness using ScriptTest mechanism.
> ----------------------------------------------------------------------------------------------
>                 Key: DERBY-5977
>                 URL: https://issues.apache.org/jira/browse/DERBY-5977
>             Project: Derby
>          Issue Type: Improvement
>          Components: Test
>            Reporter: Myrna van Lunteren
>            Assignee: Myrna van Lunteren
>         Attachments: DERBY-5977_1.diff, DERBY-5977_1.stat, DERBY-5977_2.diff, DERBY-5977_2.stat
> There are a number of .sql tests in the storemore suite, which might be able to in the
junit framework through a scriptTest. 
> They can still be fully converted at a later stage if we need more control.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

View raw message