Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 88951 invoked from network); 21 Jul 2006 00:41:29 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 21 Jul 2006 00:41:29 -0000 Received: (qmail 76316 invoked by uid 500); 21 Jul 2006 00:41:28 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 76283 invoked by uid 500); 21 Jul 2006 00:41:28 -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 76274 invoked by uid 99); 21 Jul 2006 00:41:28 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 20 Jul 2006 17:41:28 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [209.237.227.198] (HELO brutus.apache.org) (209.237.227.198) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 20 Jul 2006 17:41:27 -0700 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id B3C9741000A for ; Fri, 21 Jul 2006 00:39:15 +0000 (GMT) Message-ID: <27565086.1153442355733.JavaMail.jira@brutus> Date: Thu, 20 Jul 2006 17:39:15 -0700 (PDT) From: "Daniel John Debrunner (JIRA)" To: derby-dev@db.apache.org Subject: [jira] Commented: (DERBY-1555) API for configuration information in Derby's JUnit tests should through instance methods of the base classes, not static methods and static fields In-Reply-To: <5310598.1153434253931.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 X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N [ http://issues.apache.org/jira/browse/DERBY-1555?page=comments#action_12422523 ] Daniel John Debrunner commented on DERBY-1555: ---------------------------------------------- Looking at this more the basic class structure is good, TestConfiguration as a stand-alone class, though the use of a static CONFIG variable has inflitrated a lot of tests. The pattern here http://www.devx.com/Java/Article/28119/1954?pf=true suggests using a ThreadLocal to pass context state around in JUnit tests, in this case it would be the TestConfiguration object. A new class BaseJDBCTestSetup extends TestSetup would also bring value, as most of the test decorators will be performing JDBC work. > API for configuration information in Derby's JUnit tests should through instance methods of the base classes, not static methods and static fields > -------------------------------------------------------------------------------------------------------------------------------------------------- > > Key: DERBY-1555 > URL: http://issues.apache.org/jira/browse/DERBY-1555 > Project: Derby > Issue Type: Improvement > Components: Test > Reporter: Daniel John Debrunner > Assigned To: Daniel John Debrunner > > The heavy use of static state information in the existing Derby (non-Junit) harness was a major mistake, it should not be repeated in the Junit model. > It should be changed before too many tests are written. > A static configuration will limit the ability for the tests to be flexible and have different instances running with different configurations, > a instance based scheme will be more flexible. > This change will just change the api, the current implementation of a single static configuration will remain but be hidden within the base-classes. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira