Skip to content

Commit

Permalink
JPA test framework updates - minor cleanup
Browse files Browse the repository at this point in the history
Signed-off-by: Radek Felcman <radek.felcman@oracle.com>
  • Loading branch information
rfelcman committed Jun 30, 2022
1 parent d7d5a77 commit ee55e10
Show file tree
Hide file tree
Showing 10 changed files with 29 additions and 4 deletions.
1 change: 1 addition & 0 deletions jpa/eclipselink.jpa.testapps/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,7 @@
</goals>
<configuration>
<additionalClasspathElements>
<!--TODO It should be replaced by https://search.maven.org/artifact/org.wildfly/wildfly-client-all/27.0.0.Alpha1/jar resolved by dependency plugin-->
<additionalClasspathElement>/Users/lukas/java/wildfly-preview-27.0.0.Alpha1/bin/client/jboss-client.jar</additionalClasspathElement>
</additionalClasspathElements>
<reportNameSuffix>server</reportNameSuffix>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -755,13 +755,13 @@ public void runBareClient() throws Throwable {
}
}
}
Throwable t = null;
for (String runner : testRunners) {
Throwable t = null;
TestRunner runnerBean = (TestRunner) context.lookup(testrunnerCtx + "/" + runner);
t = runnerBean.runTest(getClass().getName(), getName(), getServerProperties());
}
if (t != null) {
throw t;
if (t != null) {
throw t;
}
}
} else {
//use defined set of pre-configured test runners
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@
@TransactionManagement(TransactionManagementType.BEAN)
public class GenericTestRunner implements TestRunner {

public GenericTestRunner() {
}

/**
* Execute a test case method. The test class is loaded dynamically and
* must therefore be visible to the TestRunnerBean classloader.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@
@TransactionManagement(TransactionManagementType.BEAN)
public class SingleUnitTestRunnerBean extends GenericTestRunner {

public SingleUnitTestRunnerBean() {
}

/** The entity manager for the test is injected and passed to the test server platform. */
@PersistenceContext
private EntityManager entityManager;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@
@TransactionManagement(TransactionManagementType.BEAN)
public class TestRunner1Bean extends GenericTestRunner {

public TestRunner1Bean() {
}

/** The entity manager for the test is injected and passed to the test server platform. */
@PersistenceContext(unitName="MulitPU-1")
private EntityManager entityManager;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@
@TransactionManagement(TransactionManagementType.BEAN)
public class TestRunner2Bean extends GenericTestRunner {

public TestRunner2Bean() {
}

/** The entity manager for the test is injected and passed to the test server platform. */
@PersistenceContext(unitName="MulitPU-2")
private EntityManager entityManager;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@
@TransactionManagement(TransactionManagementType.BEAN)
public class TestRunner3Bean extends GenericTestRunner {

public TestRunner3Bean() {
}

/** The entity manager for the test is injected and passed to the test server platform. */
@PersistenceContext(unitName="MulitPU-3")
private EntityManager entityManager;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@
@TransactionManagement(TransactionManagementType.BEAN)
public class TestRunner4Bean extends GenericTestRunner {

public TestRunner4Bean() {
}

/** The entity manager for the test is injected and passed to the test server platform. */
@PersistenceContext(unitName="MulitPU-4")
private EntityManager entityManager;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@
@TransactionManagement(TransactionManagementType.BEAN)
public class TestRunner5Bean extends GenericTestRunner {

public TestRunner5Bean() {
}

/** The entity manager for the test is injected and passed to the test server platform. */
@PersistenceContext(unitName="MulitPU-5")
private EntityManager entityManager;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@
@TransactionManagement(TransactionManagementType.BEAN)
public class TestRunner6Bean extends GenericTestRunner {

public TestRunner6Bean() {
}

/** The entity manager for the test is injected and passed to the test server platform. */
@PersistenceContext(unitName="MulitPU-6")
private EntityManager entityManager;
Expand Down

0 comments on commit ee55e10

Please sign in to comment.