db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dag H. Wanvik (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (DERBY-3838) Convert derbynet/DerbyNetAutoStart to JUnit
Date Wed, 20 Mar 2013 06:45:15 GMT

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

Dag H. Wanvik commented on DERBY-3838:
--------------------------------------

Thanks, Myrna! Some comments:

- unused import: org.apache.derbyTesting.junit.JDBC
- line 142: getBasePort is static, so better to use TestConfiguration.getBasePort ?
- TODO: missing: port equals -1. Should this work or not?
- xtestStartNetworkServerTrueNoPort: rename, the initial x is often used to comment out test
cases, so confusing.
- removeSystemProperty("derby.drda.startNetworkServer") in setUp necessary?  If so, shouldn't
some other tests have cleaned up?  Suggest pushing and popping setting in test on setUp/tearDown
- TODO: testStartNetworkServerFalse: remove debugging output testStartNetworkServerFalse:
incorrect indent in much of method
- pingForServerUp: if we expect server not to come up, return before 60 seconds, I think,
to save test time. It shouldn't matter much for coverage. Maybe 15s?
- xtestStartNetworkServerTrueNoPort: bad indent line 2
- TODO; startNetworkServerTrueHelper remove debug printing
- "(emb)derbynet.DerbyNetAutoStartTest.testStartNetworkServerLogMessageOnDoubleBoot xtestchecklog
the port is 1532" failed for me. 

  [Error/failure logged at Wed Mar 20 16:33:53 EST 2013]
junit.framework.AssertionFailedError: Timed out waiting for network server to start (localhost:1527)
	at junit.framework.Assert.fail(Assert.java:47)
	at org.apache.derbyTesting.junit.NetworkServerTestSetup.waitForServerStart(NetworkServerTestSetup.java:565)
	at org.apache.derbyTesting.functionTests.tests.derbynet.DerbyNetAutoStartTest.testStartNetworkServerLogMessageOnDoubleBoot(DerbyNetAutoStartTest.java:196)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:601)
	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:117)
	at org.apache.derbyTesting.junit.BaseJDBCTestCase.runBareOverridable(BaseJDBCTestCase.java:424)
	at org.apache.derbyTesting.junit.BaseJDBCTestCase.runBare(BaseJDBCTestCase.java:441)
	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.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 junit.textui.TestRunner.doRun(TestRunner.java:121)
	at junit.textui.TestRunner.start(TestRunner.java:185)
	at junit.textui.TestRunner.main(TestRunner.java:143)

    Note: are we trying to access 1527? Test says its trying to reach 1532?

- Another failure: 2) testStartNetworkServerFalse(org.apache.derbyTesting.functionTests.tests.derbynet.DerbyNetAutoStartTest)junit.framework.AssertionFailedError
	at org.apache.derbyTesting.functionTests.tests.derbynet.DerbyNetAutoStartTest.testStartNetworkServerFalse(DerbyNetAutoStartTest.java:96)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at org.apache.derbyTesting.junit.BaseTestCase.runBare(BaseTestCase.java:117)
	at org.apache.derbyTesting.junit.BaseJDBCTestCase.runBareOverridable(BaseJDBCTestCase.java:424)
	at org.apache.derbyTesting.junit.BaseJDBCTestCase.runBare(BaseJDBCTestCase.java:441)

  Could it be that the test fixtures are run in "wrong" order? Java 1.7 runs them in arbitrary
order...

- Some lines > 80 long.


                
> Convert derbynet/DerbyNetAutoStart to JUnit
> -------------------------------------------
>
>                 Key: DERBY-3838
>                 URL: https://issues.apache.org/jira/browse/DERBY-3838
>             Project: Derby
>          Issue Type: Improvement
>          Components: Test
>    Affects Versions: 10.5.1.1
>            Reporter: Erlend Birkenes
>            Assignee: Myrna van Lunteren
>            Priority: Minor
>         Attachments: DERBY-3838.diff, DERBY-3838.diff
>
>


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message