db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kathey Marsden (JIRA)" <j...@apache.org>
Subject [jira] Commented: (DERBY-3808) Convert subquery.sql to junit
Date Wed, 08 Oct 2008 17:55:44 GMT

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

Kathey Marsden commented on DERBY-3808:
---------------------------------------

Thanks Manjula for the patch.  Just a few comments.
- Need the license header
- The original test set derby.language.statementCacheSize=0 so we should do that with SystemPropertyTestSetup.
- It would be better to use CleanDatabaseTestSetup/decorateSql  for the initial creation of
tables and functions so that it doesn't occur with each fixture.
- You can use setAutocommit() and rollback() instead of getConnection().setAutocommit() and
getConnection().rollback().

For the new method for RuntimeStatisticsParser, I think something like this should work. (Needs
testing and javadoc).

 public boolean findOrderedStrings(String[] searchStrings) {
        return findOrderedStrings(0,searchStrings);
        
    }
    
    private boolean findOrderedStrings(int start, String[] searchStrings) {
        int len = searchStrings.length;
        if (searchStrings.length == 0)
            return true;
        else
        {        
            int offset = statistics.indexOf(searchStrings[0],start);
            if (offset == -1) 
                return false;
            String[] newSearchStrings = new String[len -1];
            System.arraycopy(searchStrings, 1, newSearchStrings, 0, len-1);    
            return findOrderedStrings(offset, newSearchStrings);
        }
    }

> Convert subquery.sql to junit
> -----------------------------
>
>                 Key: DERBY-3808
>                 URL: https://issues.apache.org/jira/browse/DERBY-3808
>             Project: Derby
>          Issue Type: Bug
>            Reporter: Manjula Kutty
>         Attachments: DERBY_3808_diff_07_10.txt, DERBY_3808_stat_07_10.txt
>
>
> place holder for converting subquery.sql to junit , which gives intermittent failures
with derbyall

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


Mime
View raw message