Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 63189 invoked from network); 21 Aug 2008 15:57:44 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 21 Aug 2008 15:57:44 -0000 Received: (qmail 14656 invoked by uid 500); 21 Aug 2008 15:57:41 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 14618 invoked by uid 500); 21 Aug 2008 15:57:41 -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 14601 invoked by uid 99); 21 Aug 2008 15:57:41 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 21 Aug 2008 08:57:41 -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, 21 Aug 2008 15:56:44 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 3C3EE234C1C2 for ; Thu, 21 Aug 2008 08:56:44 -0700 (PDT) Message-ID: <1457398204.1219334204245.JavaMail.jira@brutus> Date: Thu, 21 Aug 2008 08:56:44 -0700 (PDT) From: "Knut Anders Hatlen (JIRA)" To: derby-dev@db.apache.org Subject: [jira] Updated: (DERBY-3841) 'testTimeSlice_*(NetworkServerControlApiTest.java)' fails on Jvm1.5/vista, Jvm1.4/SunOS 5.11 In-Reply-To: <1946974612.1218784544430.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-3841?page=3Dcom.atlassia= n.jira.plugin.system.issuetabpanels:all-tabpanel ] Knut Anders Hatlen updated DERBY-3841: -------------------------------------- Attachment: d3841.diff The logic for collecting the output in BaseTestCase.assertExecJavaCmdAsExpe= cted() looks broken: while ((inStream.read(ca, 0, ca.length)) !=3D -1) { output =3D output + new String(ca).trim(); } Two problems: 1) the return value from Reader.read() is thrown away, so we don't know h= ow many chars to use from the char array, and we may add junk to the string 2) the call to String.trim() may remove significant white space The attached patch fixes it by using another String constructor which allow= s you to specify which parts of the char array to use, and by removing the = calls to String.trim(). I don't see the failure any more when running with = the patch. > 'testTimeSlice_*(NetworkServerControlApiTest.java)' fails on Jvm1.5/vista= , Jvm1.4/SunOS 5.11 > -------------------------------------------------------------------------= ------------------- > > Key: DERBY-3841 > URL: https://issues.apache.org/jira/browse/DERBY-3841 > Project: Derby > Issue Type: Bug > Components: Regression Test Failure > Affects Versions: 10.5.0.0 > Environment: 1) > OS: Microsoft=C2=A9 Windows VistaT Ultimate - 6.0.6001 Service Pack 1 - W= indowsNT 0 6 > JVM: Sun Microsystems Inc. > java version "1.5.0_14"=20 > Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_14-b03) > Java HotSpot(TM) Client VM (build 1.5.0_14-b03 mixed mode 32-bit) > 2) > OS: Solaris Express Community Edition snv_86 X86bits - SunOS 5.11 snv_86 > JVM: Sun Microsystems Inc. > java version "1.4.2_02" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_02-b03) > Java HotSpot(TM) Client VM (build 1.4.2_02-b03 mixed mode 32-bit) > Reporter: Ole Solberg > Attachments: d3841.diff, derby-3841_more_info_diff.txt > > > The failure was seen on Win Vista, Jvm 1.5 and SunOS 5.11, Jvm 1.4. > http://dbtg.thresher.com/derby/test/Daily/jvm1.5/testing/testlog/vista/68= 5949-suitesAll_diff.txt : > 1) testTimeSlice_Neg12(org.apache.derbyTesting.functionTests.tests.derbyn= et.NetworkServerControlApiTest)junit.framework.AssertionFailedError > =09at org.apache.derbyTesting.junit.BaseTestCase.assertExecJavaCmdAsExpec= ted(BaseTestCase.java:511) > =09at org.apache.derbyTesting.functionTests.tests.derbynet.NetworkServerC= ontrolApiTest.testTimeSlice_Neg12(NetworkServerControlApiTest.java:507) > =09at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > =09at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImp= l.java:39) > =09at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcc= essorImpl.java:25) > =09at org.apache.derbyTesting.junit.BaseTestCase.runBare(BaseTestCase.jav= a:104) > =09at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24) > =09at junit.extensions.TestSetup$1.protect(TestSetup.java:21) > =09at junit.extensions.TestSetup.run(TestSetup.java:25) > =09at org.apache.derbyTesting.junit.BaseTestSetup.run(BaseTestSetup.java:= 57) > =09at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24) > =09at junit.extensions.TestSetup$1.protect(TestSetup.java:21) > =09at junit.extensions.TestSetup.run(TestSetup.java:25) > =09at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24) > =09at junit.extensions.TestSetup$1.protect(TestSetup.java:21) > =09at junit.extensions.TestSetup.run(TestSetup.java:25) > =09at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24) > =09at junit.extensions.TestSetup$1.protect(TestSetup.java:21) > =09at junit.extensions.TestSetup.run(TestSetup.java:25) > http://dbtg.thresher.com/derby/test/Daily/jvm1.4/testing/testlog/solN+1/6= 85949-suitesAll_diff.txt : > 1) testTimeSlice_a(org.apache.derbyTesting.functionTests.tests.derbynet.N= etworkServerControlApiTest)junit.framework.AssertionFailedError > =09at org.apache.derbyTesting.junit.BaseTestCase.assertExecJavaCmdAsExpec= ted(BaseTestCase.java:511) > =09at org.apache.derbyTesting.functionTests.tests.derbynet.NetworkServerC= ontrolApiTest.testTimeSlice_a(NetworkServerControlApiTest.java:554) > =09at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > =09at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImp= l.java:39) > =09at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcc= essorImpl.java:25) > =09at org.apache.derbyTesting.junit.BaseTestCase.runBare(BaseTestCase.jav= a:104) > =09at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24) > =09at junit.extensions.TestSetup$1.protect(TestSetup.java:21) > =09at junit.extensions.TestSetup.run(TestSetup.java:25) > =09at org.apache.derbyTesting.junit.BaseTestSetup.run(BaseTestSetup.java:= 57) > =09at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24) > =09at junit.extensions.TestSetup$1.protect(TestSetup.java:21) > =09at junit.extensions.TestSetup.run(TestSetup.java:25) > =09at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24) > =09at junit.extensions.TestSetup$1.protect(TestSetup.java:21) > =09at junit.extensions.TestSetup.run(TestSetup.java:25) > =09at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24) > =09at junit.extensions.TestSetup$1.protect(TestSetup.java:21) > =09at junit.extensions.TestSetup.run(TestSetup.java:25) --=20 This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.