Skip to content

Commit

Permalink
Mapped JTA DS: Refactoring
Browse files Browse the repository at this point in the history
Cleanup, added javadoc, moved a helper class to the test tools module
  • Loading branch information
OndroMih committed Jun 21, 2024
1 parent b018e55 commit 2d9d392
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
*/
package org.glassfish.main.test.setup;
package org.glassfish.main.itest.tools.setup;

import static java.lang.System.Logger.Level.INFO;

Expand All @@ -24,7 +24,7 @@
import org.jboss.shrinkwrap.api.spec.WebArchive;

/**
*
* Adds some helper methods as default interface methods related to creating deployments in tests.
* @author Ondro Mihalyi
*/
public interface DeploymentAware {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@

import org.glassfish.main.itest.tools.asadmin.Asadmin;
import org.glassfish.main.itest.tools.asadmin.AsadminResult;
import org.glassfish.main.itest.tools.setup.DeploymentAware;
import org.glassfish.main.test.app.persistence.resourceref.webapp.ResourceRefApplication;
import org.glassfish.main.test.app.persistence.resourceref.webapp.ResourceRefResource;
import org.glassfish.main.test.setup.DeploymentAware;

/**
* Tests that JTA datasource in persistence.xml can be a resource reference
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@
import static org.glassfish.main.itest.tools.asadmin.AsadminResultMatcher.asadminOK;
import static org.hamcrest.MatcherAssert.assertThat;



/**
* Tests bytecode preprocessing in ASURLClassLoader.
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2023,2024 Contributors to the Eclipse Foundation.
* Copyright (c) 2023 Contributors to the Eclipse Foundation.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
Expand Down Expand Up @@ -38,7 +38,6 @@

import static org.glassfish.main.itest.tools.GlassFishTestEnvironment.getAsadmin;


public class ClassTransformerTestBase {

private static final String PROVIDER_FILE_NAME = "provider.jar";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
import java.net.HttpURLConnection;
import java.nio.file.Files;

import org.glassfish.main.test.app.persistence.transform.webapp.ClassTransformerApplication;
import org.glassfish.main.test.app.persistence.transform.webapp.ClassTransformerResource;
import org.jboss.shrinkwrap.api.ShrinkWrap;
import org.jboss.shrinkwrap.api.asset.EmptyAsset;
import org.jboss.shrinkwrap.api.spec.WebArchive;
Expand All @@ -33,9 +35,6 @@
import static org.hamcrest.CoreMatchers.equalTo;
import static org.hamcrest.MatcherAssert.assertThat;

import org.glassfish.main.test.app.persistence.transform.webapp.ClassTransformerApplication;
import org.glassfish.main.test.app.persistence.transform.webapp.ClassTransformerResource;

/**
* Tests bytecode preprocessing in WebappClassLoader.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
import static org.glassfish.main.itest.tools.asadmin.AsadminResultMatcher.asadminOK;
import static org.hamcrest.MatcherAssert.assertThat;


/**
* Tests synchronization between DAS and standalone instance.
*/
Expand All @@ -58,6 +57,7 @@ public static void createInstance() {
try {
assertThat(ASADMIN.exec("create-instance", "--node", "localhost-domain1", INSTANCE_NAME), asadminOK());
} catch (AssertionError e) {
// cleanup on error, the instance is not going to be deleted otherwise
ASADMIN.exec("delete-instance", INSTANCE_NAME);
throw e;
}
Expand Down

0 comments on commit 2d9d392

Please sign in to comment.