-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test(tomcat10): Restore Engine Integration Tests
Context: Tomcat 10, CDI and Weld Tests Fix: This commit includes a fix for the tests to load weld under the Tomcat lib folder instead of placing it into the WEB-INF/lib folder of the individual wars used by the tests. Related-to: #4434
- Loading branch information
Showing
26 changed files
with
257 additions
and
62 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 41 additions & 0 deletions
41
...ests-engine/src/test/java-tomcat9/org/camunda/bpm/integrationtest/util/TestConstants.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
/* | ||
* Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH | ||
* under one or more contributor license agreements. See the NOTICE file | ||
* distributed with this work for additional information regarding copyright | ||
* ownership. Camunda licenses this file to you under the Apache License, | ||
* Version 2.0; you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package org.camunda.bpm.integrationtest.util; | ||
|
||
/** | ||
* @author Thorben Lindhauer | ||
* | ||
*/ | ||
public class TestConstants { | ||
|
||
public final static String APP_NAME = ""; | ||
public final static String PROCESS_ENGINE_SERVICE_JNDI_NAME = "java:comp/env/ProcessEngineService"; | ||
public final static String PROCESS_APPLICATION_SERVICE_JNDI_NAME = "java:comp/env/ProcessApplicationService"; | ||
|
||
public static String getAppName() { | ||
return APP_NAME; | ||
} | ||
|
||
public String getEngineService() { | ||
return PROCESS_ENGINE_SERVICE_JNDI_NAME; | ||
} | ||
|
||
public String getProcessApplicationService() { | ||
return PROCESS_APPLICATION_SERVICE_JNDI_NAME; | ||
} | ||
|
||
} |
88 changes: 88 additions & 0 deletions
88
...ests-engine/src/test/java-tomcat9/org/camunda/bpm/integrationtest/util/TestContainer.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
/* | ||
* Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH | ||
* under one or more contributor license agreements. See the NOTICE file | ||
* distributed with this work for additional information regarding copyright | ||
* ownership. Camunda licenses this file to you under the Apache License, | ||
* Version 2.0; you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package org.camunda.bpm.integrationtest.util; | ||
|
||
import org.jboss.shrinkwrap.api.spec.WebArchive; | ||
|
||
/** | ||
* Tomcat test container. | ||
* | ||
* @author Daniel Meyer | ||
*/ | ||
public class TestContainer { | ||
|
||
/** | ||
* In some scenarios, Tomcat 10 and Weld 5 have issues when the Weld library is embedded into the WAR. | ||
* To solve these issues, Weld is added to the Tomcat server libs folder. | ||
*/ | ||
public static void addContainerSpecificResourcesEmbedCdiLib(WebArchive webArchive) { | ||
addContainerSpecificResources(webArchive); | ||
} | ||
|
||
public static void addContainerSpecificResources(WebArchive webArchive) { | ||
webArchive | ||
.addAsManifestResource("context.xml") | ||
.addClass(TestProcessApplication.class) | ||
.addAsWebInfResource("web.xml") | ||
.addAsLibraries(DeploymentHelper.getWeld()); | ||
} | ||
|
||
public static void addContainerSpecificResourcesWithoutWeld(WebArchive webArchive) { | ||
webArchive | ||
.addAsManifestResource("context.xml") | ||
.addClass(TestProcessApplication.class) | ||
.addAsWebInfResource("web-without-weld.xml", "web.xml"); | ||
} | ||
|
||
/** | ||
* In some scenarios, Tomcat 10 and Weld 5 have issues when the Weld library is embedded into the WAR. | ||
* To solve these issues, Weld is added to the Tomcat server libs folder. | ||
*/ | ||
public static void addContainerSpecificResourcesForNonPaEmbedCdiLib(WebArchive webArchive) { | ||
addContainerSpecificResourcesForNonPa(webArchive); | ||
} | ||
|
||
public static void addContainerSpecificResourcesForNonPa(WebArchive webArchive) { | ||
webArchive | ||
.addAsManifestResource("context.xml") | ||
.addAsWebInfResource("web.xml") | ||
.addAsLibraries(DeploymentHelper.getWeld()); | ||
} | ||
|
||
public static void addContainerSpecificResourcesForNonPaWithoutWeld(WebArchive webArchive) { | ||
webArchive | ||
.addAsManifestResource("context.xml") | ||
.addAsWebInfResource("web-without-weld.xml", "web.xml"); | ||
} | ||
|
||
public static void addContainerSpecificProcessEngineConfigurationClass(WebArchive deployment) { | ||
// nothing to do | ||
} | ||
|
||
public static void addSpinJacksonJsonDataFormat(WebArchive webArchive) { | ||
webArchive.addAsLibraries(DeploymentHelper.getSpinJacksonJsonDataFormatForServer("tomcat")); | ||
} | ||
|
||
public static void addJodaTimeJacksonModule(WebArchive webArchive) { | ||
webArchive.addAsLibraries(DeploymentHelper.getJodaTimeModuleForServer("tomcat")); | ||
} | ||
|
||
public static void addCommonLoggingDependency(WebArchive webArchive) { | ||
// nothing to do | ||
} | ||
|
||
} |
30 changes: 30 additions & 0 deletions
30
...ne/src/test/java-tomcat9/org/camunda/bpm/integrationtest/util/TestProcessApplication.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
/* | ||
* Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH | ||
* under one or more contributor license agreements. See the NOTICE file | ||
* distributed with this work for additional information regarding copyright | ||
* ownership. Camunda licenses this file to you under the Apache License, | ||
* Version 2.0; you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package org.camunda.bpm.integrationtest.util; | ||
|
||
import org.camunda.bpm.application.ProcessApplication; | ||
import org.camunda.bpm.application.impl.ServletProcessApplication; | ||
|
||
/** | ||
* @author Daniel Meyer | ||
* | ||
*/ | ||
@ProcessApplication | ||
// Using fully-qualified class name instead of import statement to allow for automatic Jakarta transformation | ||
public class TestProcessApplication extends org.camunda.bpm.application.impl.ServletProcessApplication { | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -90,4 +90,4 @@ protected static Asset modelAsAsset(BpmnModelInstance modelInstance) { | |
return new ByteArrayAsset(bytes); | ||
} | ||
|
||
} | ||
} |
Oops, something went wrong.