Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 71518 invoked from network); 15 Dec 2006 15:05:44 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 15 Dec 2006 15:05:44 -0000 Received: (qmail 16755 invoked by uid 500); 15 Dec 2006 15:05:51 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 16723 invoked by uid 500); 15 Dec 2006 15:05:51 -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 16713 invoked by uid 99); 15 Dec 2006 15:05:51 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 15 Dec 2006 07:05:51 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 15 Dec 2006 07:05:43 -0800 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 9F01971413D for ; Fri, 15 Dec 2006 07:05:22 -0800 (PST) Message-ID: <10853051.1166195122647.JavaMail.jira@brutus> Date: Fri, 15 Dec 2006 07:05:22 -0800 (PST) From: "Julius Stroffek (JIRA)" To: derby-dev@db.apache.org Subject: [jira] Updated: (DERBY-2031) Convert derbynet/testProtocol.java to JUnit In-Reply-To: <12104694.1162486458063.JavaMail.root@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 [ http://issues.apache.org/jira/browse/DERBY-2031?page=all ] Julius Stroffek updated DERBY-2031: ----------------------------------- Attachment: d2031.diff d2031.stat Attaching a proposed patch. I moved the implementation of the test from the org.apache.derby.impl.drda package to org.apache.derbyTesting.functionTests.tests.derbynet.DRDAProtocolTest class. This required to change the visibility of some classes and methods in the drda to be accessible by the test. Actually I had two choices how to handle the test: 1.) Write a test inside the drda package as it was before using the junit. - this will require the junit jar files to build a derby and som classes in derby.jar will be linked against junit.jar. - the location of test will be non standard 2.) Change the visibility of some methods of drda protocol implementation to public - The instances of som of these classes might be created somewhere else however the instances created in derby network server are still hidden for other packages. Simply said, one can create DDMReader or DDMWriter instances and call some of their methods, however it is not possible to access the corresponding instances of these classes used by the server. I implemented the patch according the option 2.) I am interested in your comments on this. I ran derbyall and suites.All suites without failures. > Convert derbynet/testProtocol.java to JUnit > ------------------------------------------- > > Key: DERBY-2031 > URL: http://issues.apache.org/jira/browse/DERBY-2031 > Project: Derby > Issue Type: Improvement > Components: Network Server, Test > Affects Versions: 10.3.0.0 > Reporter: Knut Anders Hatlen > Assigned To: Julius Stroffek > Priority: Minor > Attachments: d2031.diff, d2031.stat > > > testProtocol.java executes DRDA commands from a file written in a special-purpose language. The statements are very much like assertions, so it should be fairly easy to convert the test to JUnit. > Suggested approach: Change the interpreter (TestProto.java) so that is uses Assert.fail() instead of System.err.println() and System.exit(), and BaseTestCase.println() instead of System.out.println(). It should also use TestConfiguration to get the host name and port number. -- 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