Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 84018 invoked from network); 22 May 2008 23:52:20 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 22 May 2008 23:52:20 -0000 Received: (qmail 80861 invoked by uid 500); 22 May 2008 23:52:21 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 80837 invoked by uid 500); 22 May 2008 23:52:21 -0000 Mailing-List: contact derby-dev-help@db.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: Delivered-To: mailing list derby-dev@db.apache.org Received: (qmail 80826 invoked by uid 99); 22 May 2008 23:52:21 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 22 May 2008 16:52:21 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 22 May 2008 23:51:35 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 59B6F234C11B for ; Thu, 22 May 2008 16:51:56 -0700 (PDT) Message-ID: <979697260.1211500316366.JavaMail.jira@brutus> Date: Thu, 22 May 2008 16:51:56 -0700 (PDT) From: "Kathey Marsden (JIRA)" To: derby-dev@db.apache.org Subject: [jira] Commented: (DERBY-3663) Convert store/streamingColumn to JUnit In-Reply-To: <1276260874.1210003075610.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/DERBY-3663?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12599249#action_12599249 ] Kathey Marsden commented on DERBY-3663: --------------------------------------- Here are some comments. I will look more on Monday. Probably already have these on your list. - add test to suite. - remove from derbyall and cleanup old test files. Comments on StreamingColumnTest - It's a failing of the original test, but it would be great to have some javadoc comments for the fixtures. - The unused method private static void expectedException1(SQLException sqle) can be removed. -- basesuite() - In basesuite we have TestSuite suite = new TestSuite(name); suite.addTestSuite(StreamingColumnTest.class); Test test = new SupportFilesSetup(suite, new String[] { "functionTests/tests/store/short.data", "functionTests/tests/store/shortbanner", "functionTests/tests/store/derby.banner", "functionTests/tests/store/empty.data"} ); return new CleanDatabaseTestSetup(DatabasePropertyTestSetup .setLockTimeouts(suite, 2, 4)) { Shouldn't it be test and not suite that gets passed to CleanDatabaseTestSetup? -- testStream1() - We have: try {// if trying to insert data > 32700, there will be an // exception ps.executeUpdate(); println("No truncation and hence no error"); } catch (SQLException e) { if (fileLength[i] > Limits.DB2_LONGVARCHAR_MAXWIDTH) { assertSQLState("22001", e); // was getting data longer // than maxValueAllowed println("expected exception for data > " + Limits.DB2_LONGVARCHAR_MAXWIDTH + " in length"); \ There should be a fail(....) after the ps.excecuteUpdate for the cases where we expect an exception. - I know it was part of the original test, but it seems strange that the test imports and uses mport org.apache.derby.iapi.reference.Limits. Typically the test code does not use the engine code. Perhaps we could use constants in the test insteadx. --testStream2*() - I feel a little funny about the duplicate code in testStream2_1500, testStream2_5000 and testStream2_10000. Could you extract some of the code and have a testStream2(long length, String tablename) that you call from these methods? -- testStream3*() - Same comment about duplicate code. - Statement sourceStmt = createStatement(); is not needed -- testStream4() - local variable met is not used. - you can remove the catch and throw of the exception since the method already throws Exception. - one thing that is funny is that the results that are processed don't seem to be checked at all. This is a carryover from the original test, but at least perhaps we could check the columnSize. > Convert store/streamingColumn to JUnit > -------------------------------------- > > Key: DERBY-3663 > URL: https://issues.apache.org/jira/browse/DERBY-3663 > Project: Derby > Issue Type: Test > Components: Test > Reporter: Suran Jayathilaka > Assignee: Suran Jayathilaka > Attachments: derby-3663-1.diff > > > Convert org.apache.derbyTesting.functionTests.tests.store.streamingColumn to a JUnit testcase. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.