You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cactus-dev@jakarta.apache.org by ji...@apache.org on 2004/04/17 17:28:30 UTC
[jira] Updated: (CACTUS-49) Jetty doesn't stop after Cactus test run in Eclipse
The following issue has been updated:
Updater: Vincent Massol (mailto:vmassol@apache.org)
Date: Sat, 17 Apr 2004 8:27 AM
Changes:
assignee changed from Cactus Developers Mailing List to Vincent Massol
description changed from The class 'org.apache.cactus.extension.jetty.JettyTestSetup' is used to start Jetty when running a
Cactus test in Eclipse. Jetty starts properly but isn't shutdown when the test is completed. This
is a problem if a TestSuite contains two JettyTestSetup tests. In our company we have an
AllTests class in each package which runs all of the tests in the package and subpackages. Hence
we have many cases where a TestSuite runs more than one JettyTestSetup test. The server fails
to start for subsequent JettyTestSetup tests and no further tests are run.
The fix is to make two changes. The first is to make the server a class variable. The lines:
// Create a Jetty Server object and configure a listener
Object server = createServer(baseConfig);
should be
// Create a Jetty Server object and configure a listener
server = createServer(baseConfig);
with 'Object server' declared with the other class variables.
The second change is to stop Jetty in the tearDown method as such:
protected void tearDown() throws Exception {
super.tearDown();
if (server != null) {
server.getClass().getMethod("stop", null).invoke(server, null);
}
} to The class 'org.apache.cactus.extension.jetty.JettyTestSetup' is used to start Jetty when running a
Cactus test in Eclipse. Jetty starts properly but isn't shutdown when the test is completed. This
is a problem if a TestSuite contains two JettyTestSetup tests. In our company we have an
AllTests class in each package which runs all of the tests in the package and subpackages. Hence
we have many cases where a TestSuite runs more than one JettyTestSetup test. The server fails
to start for subsequent JettyTestSetup tests and no further tests are run.
The fix is to make two changes. The first is to make the server a class variable. The lines:
// Create a Jetty Server object and configure a listener
Object server = createServer(baseConfig);
should be
// Create a Jetty Server object and configure a listener
server = createServer(baseConfig);
with 'Object server' declared with the other class variables.
The second change is to stop Jetty in the tearDown method as such:
protected void tearDown() throws Exception {
super.tearDown();
if (server != null) {
server.getClass().getMethod("stop", null).invoke(server, null);
}
}
environment changed from Operating System: All
Platform: All to Operating System: All
Platform: All
priority changed to Blocker
Fix Version changed to 1.5-rc1
---------------------------------------------------------------------
For a full history of the issue, see:
http://issues.apache.org/jira/browse/CACTUS-49?page=history
---------------------------------------------------------------------
View the issue:
http://issues.apache.org/jira/browse/CACTUS-49
Here is an overview of the issue:
---------------------------------------------------------------------
Key: CACTUS-49
Summary: Jetty doesn't stop after Cactus test run in Eclipse
Type: Bug
Status: Resolved
Priority: Blocker
Resolution: FIXED
Project: Cactus
Components:
Eclipse Integration
Fix Fors:
1.5-rc1
Versions:
1.5-beta1
Assignee: Vincent Massol
Reporter: James Stangler
Created: Fri, 8 Aug 2003 2:13 PM
Updated: Sat, 17 Apr 2004 8:27 AM
Environment: Operating System: All
Platform: All
Description:
The class 'org.apache.cactus.extension.jetty.JettyTestSetup' is used to start Jetty when running a
Cactus test in Eclipse. Jetty starts properly but isn't shutdown when the test is completed. This
is a problem if a TestSuite contains two JettyTestSetup tests. In our company we have an
AllTests class in each package which runs all of the tests in the package and subpackages. Hence
we have many cases where a TestSuite runs more than one JettyTestSetup test. The server fails
to start for subsequent JettyTestSetup tests and no further tests are run.
The fix is to make two changes. The first is to make the server a class variable. The lines:
// Create a Jetty Server object and configure a listener
Object server = createServer(baseConfig);
should be
// Create a Jetty Server object and configure a listener
server = createServer(baseConfig);
with 'Object server' declared with the other class variables.
The second change is to stop Jetty in the tearDown method as such:
protected void tearDown() throws Exception {
super.tearDown();
if (server != null) {
server.getClass().getMethod("stop", null).invoke(server, null);
}
}
---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: cactus-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: cactus-dev-help@jakarta.apache.org