db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Knut Anders Hatlen (JIRA)" <j...@apache.org>
Subject [jira] Updated: (DERBY-3841) 'testTimeSlice_*(NetworkServerControlApiTest.java)' fails on Jvm1.5/vista, Jvm1.4/SunOS 5.11
Date Thu, 21 Aug 2008 15:56:44 GMT

     [ https://issues.apache.org/jira/browse/DERBY-3841?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Knut Anders Hatlen updated DERBY-3841:
--------------------------------------

    Attachment: d3841.diff

The logic for collecting the output in BaseTestCase.assertExecJavaCmdAsExpected() looks broken:

           while ((inStream.read(ca, 0, ca.length)) != -1)
            {
               output = output + new String(ca).trim();
            }

Two problems:

  1) the return value from Reader.read() is thrown away, so we don't know how 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 allows 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© Windows VistaT Ultimate - 6.0.6001 Service Pack 1 - WindowsNT 0 6
> JVM: Sun Microsystems Inc.
> java version "1.5.0_14" 
> 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/685949-suitesAll_diff.txt
:
> 1) testTimeSlice_Neg12(org.apache.derbyTesting.functionTests.tests.derbynet.NetworkServerControlApiTest)junit.framework.AssertionFailedError
> 	at org.apache.derbyTesting.junit.BaseTestCase.assertExecJavaCmdAsExpected(BaseTestCase.java:511)
> 	at org.apache.derbyTesting.functionTests.tests.derbynet.NetworkServerControlApiTest.testTimeSlice_Neg12(NetworkServerControlApiTest.java:507)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> 	at org.apache.derbyTesting.junit.BaseTestCase.runBare(BaseTestCase.java:104)
> 	at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24)
> 	at junit.extensions.TestSetup$1.protect(TestSetup.java:21)
> 	at junit.extensions.TestSetup.run(TestSetup.java:25)
> 	at org.apache.derbyTesting.junit.BaseTestSetup.run(BaseTestSetup.java:57)
> 	at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24)
> 	at junit.extensions.TestSetup$1.protect(TestSetup.java:21)
> 	at junit.extensions.TestSetup.run(TestSetup.java:25)
> 	at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24)
> 	at junit.extensions.TestSetup$1.protect(TestSetup.java:21)
> 	at junit.extensions.TestSetup.run(TestSetup.java:25)
> 	at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24)
> 	at junit.extensions.TestSetup$1.protect(TestSetup.java:21)
> 	at junit.extensions.TestSetup.run(TestSetup.java:25)
> http://dbtg.thresher.com/derby/test/Daily/jvm1.4/testing/testlog/solN+1/685949-suitesAll_diff.txt
:
> 1) testTimeSlice_a(org.apache.derbyTesting.functionTests.tests.derbynet.NetworkServerControlApiTest)junit.framework.AssertionFailedError
> 	at org.apache.derbyTesting.junit.BaseTestCase.assertExecJavaCmdAsExpected(BaseTestCase.java:511)
> 	at org.apache.derbyTesting.functionTests.tests.derbynet.NetworkServerControlApiTest.testTimeSlice_a(NetworkServerControlApiTest.java:554)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> 	at org.apache.derbyTesting.junit.BaseTestCase.runBare(BaseTestCase.java:104)
> 	at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24)
> 	at junit.extensions.TestSetup$1.protect(TestSetup.java:21)
> 	at junit.extensions.TestSetup.run(TestSetup.java:25)
> 	at org.apache.derbyTesting.junit.BaseTestSetup.run(BaseTestSetup.java:57)
> 	at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24)
> 	at junit.extensions.TestSetup$1.protect(TestSetup.java:21)
> 	at junit.extensions.TestSetup.run(TestSetup.java:25)
> 	at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24)
> 	at junit.extensions.TestSetup$1.protect(TestSetup.java:21)
> 	at junit.extensions.TestSetup.run(TestSetup.java:25)
> 	at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24)
> 	at junit.extensions.TestSetup$1.protect(TestSetup.java:21)
> 	at junit.extensions.TestSetup.run(TestSetup.java:25)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message