db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kristian Waagan (JIRA)" <j...@apache.org>
Subject [jira] Commented: (DERBY-2419) Tighten encapsulation of state in TestConfiguration
Date Tue, 15 Jun 2010 06:22:23 GMT

    [ https://issues.apache.org/jira/browse/DERBY-2419?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12878864#action_12878864
] 

Kristian Waagan commented on DERBY-2419:
----------------------------------------

Tests passed (12715), got one failure which is network related:

testPing(org.apache.derbyTesting.functionTests.tests.derbynet.NetworkServerControlClientCommandTest)
FAILURE:
junit.framework.AssertionFailedError
	at junit.framework.Assert.fail(Assert.java:47)
	at junit.framework.Assert.assertTrue(Assert.java:20)
	at junit.framework.Assert.assertFalse(Assert.java:34)
	at junit.framework.Assert.assertFalse(Assert.java:41)
	at org.apache.derbyTesting.junit.BaseTestCase.assertExecJavaCmdAsExpected(BaseTestCase.java:484)
	at org.apache.derbyTesting.functionTests.tests.derbynet.NetworkServerControlClientCommandTest.assertFailedPing(NetworkServerControlClientCommandTest.java:115)
	at org.apache.derbyTesting.functionTests.tests.derbynet.NetworkServerControlClientCommandTest.testPing(NetworkServerControlClientCommandTest.java:80)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at junit.framework.TestCase.runTest(TestCase.java:164)
	at junit.framework.TestCase.runBare(TestCase.java:130)
	at org.apache.derbyTesting.junit.BaseTestCase.runBare(BaseTestCase.java:109)
	at junit.framework.TestResult$1.protect(TestResult.java:106)
	at junit.framework.TestResult.runProtected(TestResult.java:124)
	at junit.framework.TestResult.run(TestResult.java:109)
	at junit.framework.TestCase.run(TestCase.java:120)
	at junit.framework.TestSuite.runTest(TestSuite.java:230)
	at junit.framework.TestSuite.run(TestSuite.java:225)
	at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24)
	at junit.extensions.TestSetup$1.protect(TestSetup.java:21)
	at junit.framework.TestResult.runProtected(TestResult.java:124)
	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.framework.TestResult.runProtected(TestResult.java:124)
	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.framework.TestResult.runProtected(TestResult.java:124)
	at junit.extensions.TestSetup.run(TestSetup.java:25)
	at junit.framework.TestSuite.runTest(TestSuite.java:230)
	at junit.framework.TestSuite.run(TestSuite.java:225)
	at junit.framework.TestSuite.runTest(TestSuite.java:230)
	at junit.framework.TestSuite.run(TestSuite.java:225)
	at kah.TestRunner.main(TestRunner.java:77)

I have seen this earlier when running tests in parallel, so I don't think it is caused by
the patch. It's a mystery to me what is started on the port in question that makes the ping
succeed.
In any case, I do plan to post a follow-up patch with a method to obtain a "bogus port".

> Tighten encapsulation of state in TestConfiguration
> ---------------------------------------------------
>
>                 Key: DERBY-2419
>                 URL: https://issues.apache.org/jira/browse/DERBY-2419
>             Project: Derby
>          Issue Type: Improvement
>          Components: Test
>    Affects Versions: 10.3.1.4
>            Reporter: Kristian Waagan
>            Priority: Minor
>         Attachments: derby-2419-1a-alternative1.diff, derby-2419-2a-alternative2.diff,
derby-2419-2a-alternative2.stat, derby-2419-3a-further_encapsulation.diff, derby-2419-refactor-01.diff
>
>
> Parts of the state of TestConfiguration has been made public, which they should not be;
DEFAULT_PORT and DEFAULT_HOSTNAME.
> Using these directly from the outside can cause settings overridden by the user to be
ignored by tests. Further, a test should not care if the host/port it uses is the Derby default
or the values set by the user running the test.
> To obtain a hostname and  a port number, use the methods getPort and getHostName in TestConfiguration.

-- 
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