Skip to content

Commit

Permalink
kie-server-tests: move container disposing to base test class (kiegro…
Browse files Browse the repository at this point in the history
  • Loading branch information
sutaakar authored and mswiderski committed Jul 13, 2016
1 parent 8c31e39 commit 7496e0a
Show file tree
Hide file tree
Showing 36 changed files with 1 addition and 35 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ public static void buildAndDeployArtifacts() {

kieContainer = KieServices.Factory.get().newKieContainer(releaseId);

disposeAllContainers();
createContainer(CONTAINER_ID, releaseId);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ public static void buildAndDeployArtifacts() {
KieServerDeployer.buildAndDeployCommonMavenParent();
KieServerDeployer.buildAndDeployMavenProject(ClassLoader.class.getResource("/kjars-sources/definition-project").getFile());

disposeAllContainers();
createContainer(CONTAINER_ID, releaseId);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ public static void buildAndDeployArtifacts() {
KieServerDeployer.buildAndDeployCommonMavenParent();
KieServerDeployer.buildAndDeployMavenProject(ClassLoader.class.getResource("/kjars-sources/definition-project").getFile());

disposeAllContainers();
createContainer(CONTAINER_ID, releaseId);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ public static void buildAndDeployArtifacts() {

kieContainer = KieServices.Factory.get().newKieContainer(releaseId);

disposeAllContainers();
createContainer(CONTAINER_ID, releaseId);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ public static void buildAndDeployArtifacts() {

kieContainer = KieServices.Factory.get().newKieContainer(releaseId);

disposeAllContainers();
createContainer(CONTAINER_ID, releaseId);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ public static void buildAndDeployArtifacts() {
KieServerDeployer.buildAndDeployCommonMavenParent();
KieServerDeployer.buildAndDeployMavenProject(ClassLoader.class.getResource("/kjars-sources/definition-project").getFile());

disposeAllContainers();
createContainer(CONTAINER_ID, releaseId);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ public static void buildAndDeployArtifacts() {
KieServerDeployer.buildAndDeployCommonMavenParent();
KieServerDeployer.buildAndDeployMavenProject(ClassLoader.class.getResource("/kjars-sources/definition-project").getFile());

disposeAllContainers();
createContainer(CONTAINER_ID, releaseId);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ public static void setupClass() throws Exception {
server.startKieServer();
}
setupCustomSettingsXml();
disposeAllContainers();
}

private static void setupCustomSettingsXml() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ public class KieServerIntegrationTest extends RestJmsSharedBaseIntegrationTest {
public static void initialize() throws Exception {
KieServerDeployer.createAndDeployKJar(releaseId1);

disposeAllContainers();
createContainer(CONTAINER_ID, releaseId1);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ public static void buildAndDeployArtifacts() {
KieServerDeployer.buildAndDeployCommonMavenParent();
KieServerDeployer.buildAndDeployMavenProject(ClassLoader.class.getResource("/kjars-sources/activation-group").getFile());

disposeAllContainers();
createContainer(CONTAINER_ID, releaseId);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ public static void buildAndDeployArtifacts() {
KieServerDeployer.buildAndDeployCommonMavenParent();
KieServerDeployer.buildAndDeployMavenProject(ClassLoader.class.getResource("/kjars-sources/agenda-group").getFile());

disposeAllContainers();
createContainer(CONTAINER_ID, releaseId);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ public static void buildAndDeployArtifacts() {
KieServerDeployer.buildAndDeployCommonMavenParent();
KieServerDeployer.buildAndDeployMavenProject(ClassLoader.class.getResource("/kjars-sources/agenda-group").getFile());

disposeAllContainers();
createContainer(CONTAINER_ID, releaseId);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ public static void initialize() throws Exception {
KieServerDeployer.buildAndDeployCommonMavenParent();
KieServerDeployer.buildAndDeployMavenProject(ClassLoader.class.getResource("/kjars-sources/stateless-session-kjar").getFile());

disposeAllContainers();
createContainer(CONTAINER_ID, releaseId);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ public static void deployArtifacts() {
KieServerDeployer.buildAndDeployMavenProject(ClassLoader.class.getResource("/kjars-sources/container-isolation-kjar1").getFile());
KieServerDeployer.buildAndDeployMavenProject(ClassLoader.class.getResource("/kjars-sources/container-isolation-kjar2").getFile());

disposeAllContainers();
createContainer(CONTAINER_1_ID, kjar1);
createContainer(CONTAINER_2_ID, kjar2);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ public static void buildAndDeployArtifacts() {

kjarClassLoader = KieServices.Factory.get().newKieContainer(releaseId).getClassLoader();

disposeAllContainers();
createContainer(CONTAINER_ID, releaseId);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ public static void buildAndDeployArtifacts() {

kjarClassLoader = KieServices.Factory.get().newKieContainer(releaseId).getClassLoader();

disposeAllContainers();
createContainer(CONTAINER_ID, releaseId);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ public static void initialize() throws Exception {
File jar = KieServerDeployer.getRepository().resolveArtifact(releaseId).getFile();
kjarClassLoader = new URLClassLoader(new URL[]{jar.toURI().toURL()});

disposeAllContainers();
createContainer(CONTAINER_ID, releaseId);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ public static void initialize() throws Exception {
File jar = KieServerDeployer.getRepository().resolveArtifact(releaseId).getFile();
kjarClassLoader = new URLClassLoader(new URL[]{jar.toURI().toURL()});

disposeAllContainers();
createContainer(CONTAINER_ID, releaseId);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ public static void buildAndDeployArtifacts() {
// the parent will build and deploy also all of its modules, so no need to deploy them individually
KieServerDeployer.buildAndDeployMavenProject(ClassLoader.class.getResource("/kjars-sources/multimodule-project").getFile());

disposeAllContainers();
createContainer(CONTAINER_1_ID, releaseIdRules1);
createContainer(CONTAINER_2_ID, releaseIdRules2);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ public static void buildAndDeployArtifacts() {

kjarClassLoader = KieServices.Factory.get().newKieContainer(releaseId).getClassLoader();

disposeAllContainers();
createContainer(CONTAINER_ID, releaseId);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ public static void buildAndDeployArtifacts() {

kjarClassLoader = KieServices.Factory.get().newKieContainer(releaseId).getClassLoader();

disposeAllContainers();
createContainer(CONTAINER_ID, releaseId);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ public static void buildAndDeployArtifacts() {

kjarClassLoader = KieServices.Factory.get().newKieContainer(releaseId).getClassLoader();

disposeAllContainers();
createContainer(CONTAINER_ID, releaseId);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ public static void deployArtifacts() {

kjarClassLoader = KieServices.Factory.get().newKieContainer(releaseId).getClassLoader();

disposeAllContainers();
createContainer(CONTAINER_ID, releaseId);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ public static void deployArtifacts() {
KieServerDeployer.buildAndDeployCommonMavenParent();
KieServerDeployer.buildAndDeployMavenProject(ClassLoader.class.getResource("/kjars-sources/state-is-kept-for-stateful-session").getFile());

disposeAllContainers();
createContainer(CONTAINER_ID, releaseId);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ public static void buildAndDeployArtifacts() {

kieContainer = KieServices.Factory.get().newKieContainer(releaseId);

disposeAllContainers();
createContainer(CONTAINER_ID, releaseId);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ public static void buildAndDeployArtifacts() {

kieContainer = KieServices.Factory.get().newKieContainer(releaseId);

disposeAllContainers();
createContainer(CONTAINER_ID, releaseId);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ public static void buildAndDeployArtifacts() {

kieContainer = KieServices.Factory.get().newKieContainer(releaseId);

disposeAllContainers();
createContainer(CONTAINER_ID, releaseId);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ public static void buildAndDeployArtifacts() {

kieContainer = KieServices.Factory.get().newKieContainer(releaseId);

disposeAllContainers();
createContainer(CONTAINER_ID, releaseId);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ public static void buildAndDeployArtifacts() {

kieContainer = KieServices.Factory.get().newKieContainer(releaseId);

disposeAllContainers();
createContainer(CONTAINER_ID, releaseId);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ public static void buildAndDeployArtifacts() {

kieContainer = KieServices.Factory.get().newKieContainer(releaseId);

disposeAllContainers();
// Having timeout issues due to kjar dependencies -> raised timeout.
KieServicesClient client = createDefaultStaticClient(EXTENDED_TIMEOUT);
ServiceResponse<KieContainerResource> reply = client.createContainer(CONTAINER_ID, new KieContainerResource(CONTAINER_ID, releaseId));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ public static void buildAndDeployArtifacts() {

kieContainer = KieServices.Factory.get().newKieContainer(releaseId);

disposeAllContainers();
createContainer(CONTAINER_ID, releaseId);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@ public static void buildAndDeployArtifacts() {
KieServerDeployer.buildAndDeployCommonMavenParent();
KieServerDeployer.buildAndDeployMavenProject(ClassLoader.class.getResource("/kjars-sources/definition-project").getFile());

disposeAllContainers();
createContainer(CONTAINER_ID, releaseId);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ public static void buildAndDeployArtifacts() {

kieContainer = KieServices.Factory.get().newKieContainer(releaseId);

disposeAllContainers();
createContainer(CONTAINER_ID, releaseId);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ public static void buildAndDeployArtifacts() {

containerRemoteController = new ContainerRemoteController(TestConfig.getContainerId(), TestConfig.getContainerPort());

disposeAllContainers();
createContainer(CONTAINER_ID, RELEASE_ID);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ public static void buildAndDeployArtifacts() {
acceptHeadersByFormat.put(MarshallingFormat.JAXB, "application/xml;q=0.9,application/json;q=0.3");// xml is preferred over json
acceptHeadersByFormat.put(MarshallingFormat.JSON, "application/json;q=0.9,application/xml;q=0.3");// json is preferred over xml

disposeAllContainers();
createContainer(CONTAINER, releaseId);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ public static void deployArtifacts() {

kieContainer = KieServices.Factory.get().newKieContainer(kjar1);

disposeAllContainers();
createContainer(CONTAINER_1_ID, kjar1);
}

Expand Down

0 comments on commit 7496e0a

Please sign in to comment.