[
https://issues.apache.org/jira/browse/DERBY-3151?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12537988
]
Kristian Waagan commented on DERBY-3151:
----------------------------------------
I haven't studied the history much, but maybe something has been added that we
already have support for?
The import statement was added the 9th of September, revision 574053.
If I write this test;
package org.apache.derbyTesting.functionTests.tests.jdbcapi;
import junit.framework.Test;
import org.apache.derbyTesting.junit.BaseJDBCTestCase;
import org.apache.derbyTesting.junit.TestConfiguration;
public class BogusTest extends BaseJDBCTestCase {
public BogusTest(String name) {
super(name);
}
public static Test suite() {
return TestConfiguration.embeddedSuite(BogusTest.class);
}
}
And then run it:
java -classpath
jars/sane/derbyTesting.jar:jars/sane/derby.jar:tools/java/junit.jar
junit.textui.TestRunner
org.apache.derbyTesting.functionTests.tests.jdbcapi.BogusTest
I get:
Failed to invoke suite():java.lang.NoClassDefFoundError:
org/apache/derby/drda/NetworkServerControl
To me this seems like a problem, since I haven't planned to run a network
server at all. I just want to run my tests with the embedded driver.
Have I overlooked something?
> Reduce dependency on NetworkServerControl in TestConfiguration
> --------------------------------------------------------------
>
> Key: DERBY-3151
> URL: https://issues.apache.org/jira/browse/DERBY-3151
> Project: Derby
> Issue Type: Improvement
> Components: Test
> Affects Versions: 10.4.0.0
> Reporter: Kristian Waagan
> Priority: Minor
> Attachments: derby-3151-1a-proposal.diff
>
>
> Code has been added in TestConfiguration to allow for starting and stopping a
> Derby network server.
> Even if you know will not need this functionality, or you simply don't want
> to have this functionality available, you must include derbynet.jar (or point
> to classes/).
> I think this dependency should be reduced, by not having any instance
> variables and by not importing the class with an explicit import statement.
> The existing instance variables are not used.
> With this planned change, you can run tests without including derbynet.jar on
> the classpath, as long as they don't call 'startNetworkServer' or
> 'stopNetworkServer'. Most often these methods will be called by a decorator.
> The downside of this change, is that you won't get any error messages before
> the mentioned methods are actually executed.
> A typical error message:
> Failed to invoke suite():java.lang.NoClassDefFoundError:
> org/apache/derby/drda/NetworkServerControl
> I'm sure there are other solutions as well, but this one is really easy.
> Any opinions on this change?
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.