From derby-dev-return-50717-apmail-db-derby-dev-archive=db.apache.org@db.apache.org Wed Nov 07 14:34:14 2007 Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 13994 invoked from network); 7 Nov 2007 14:34:14 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 7 Nov 2007 14:34:14 -0000 Received: (qmail 23570 invoked by uid 500); 7 Nov 2007 14:34:02 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 23544 invoked by uid 500); 7 Nov 2007 14:34:01 -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 23535 invoked by uid 99); 7 Nov 2007 14:34:01 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 07 Nov 2007 06:34:01 -0800 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED 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; Wed, 07 Nov 2007 14:34:45 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id A98A4714187 for ; Wed, 7 Nov 2007 06:33:50 -0800 (PST) Message-ID: <15760043.1194446030663.JavaMail.jira@brutus> Date: Wed, 7 Nov 2007 06:33:50 -0800 (PST) From: "Knut Anders Hatlen (JIRA)" To: derby-dev@db.apache.org Subject: [jira] Commented: (DERBY-3156) Convert testing of derby error stream to JUnit In-Reply-To: <9980301.1193645751263.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/DERBY-3156?page=3Dcom.atlassian= .jira.plugin.system.issuetabpanels:comment-tabpanel#action_12540756 ]=20 Knut Anders Hatlen commented on DERBY-3156: ------------------------------------------- Thanks for updating the patch, Vemund. I tried to run the test standalone, but then all test cases failed with err= ors like this one: 1) testDefault(org.apache.derbyTesting.functionTests.tests.engine.ErrorStre= amTest)java.io.FileNotFoundException: /tmp/derbytst/system /method-1.log (No such file or directory) at java.io.FileOutputStream.open(Native Method) at java.io.FileOutputStream.(FileOutputStream.java:179) at java.io.FileOutputStream.(FileOutputStream.java:131) at org.apache.derbyTesting.functionTests.tests.engine.ErrorStreamTe= st$9.run(ErrorStreamTest.java:502) at java.security.AccessController.doPrivileged(Native Method) at org.apache.derbyTesting.functionTests.tests.engine.ErrorStreamTe= st.newFileOutputStream(ErrorStreamTest.java:499) at org.apache.derbyTesting.functionTests.tests.engine.ErrorStreamTe= st.openStreams(ErrorStreamTest.java:360) at org.apache.derbyTesting.functionTests.tests.engine.ErrorStreamTe= st.setUp(ErrorStreamTest.java:100) at org.apache.derbyTesting.junit.BaseTestCase.runBare(BaseTestCase.= java:95) If I first run another test and don't delete the 'system' directory, it wor= ks fine. Seems like openStreams() requires that the database directory exis= ts. nits: The method deleteFileOnExit() is now unused and can be deleted. Perhaps the assert methods that throw IOException would have been simpler i= f they had thrown Exception instead? Then we could skip the try/catch+cast.= The PrivilegedActionException will be linked to the IOException, so we wil= l still get the stack trace, and if someone changes the code so that we can= get other exceptions than IOException, we get the original exception inste= ad of a ClassCastException. > Convert testing of derby error stream to JUnit > ---------------------------------------------- > > Key: DERBY-3156 > URL: https://issues.apache.org/jira/browse/DERBY-3156 > Project: Derby > Issue Type: Test > Components: Test > Reporter: Vemund =C3=98stgaard > Assignee: Vemund =C3=98stgaard > Priority: Minor > Attachments: 3156-diff, 3156-diff.stat, 3156-diffv2, 3156-diffv2.= stat, 3156-diffv3, 3156-diffv3.stat > > > Convert the tests that are related to derby error stream properties and f= unctionality. > Seems to be these two tests: > lang/logStream.java=20 > lang/errorStream.java --=20 This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.