Skip to content

Commit

Permalink
Update the tests
Browse files Browse the repository at this point in the history
Signed-off-by: Scott M Stark <[email protected]>
  • Loading branch information
starksm64 committed Nov 9, 2024
1 parent 8f1a544 commit e681a16
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 8 deletions.
13 changes: 13 additions & 0 deletions glassfish-runner/jpa-platform-tck/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,17 @@
<artifactId>derbytools</artifactId>
<version>10.15.2.0</version>
</dependency>
<dependency>
<groupId>org.glassfish.main.deployment</groupId>
<artifactId>dol</artifactId>
<version>${glassfish.container.version}</version>
</dependency>
<dependency>
<groupId>jakarta.tck</groupId>
<artifactId>persistence-platform-tck-tests</artifactId>
<version>11.0.0-SNAPSHOT</version>
<scope>compile</scope>
</dependency>
</dependencies>

<build>
Expand Down Expand Up @@ -616,6 +627,8 @@
<java.io.tmpdir>/tmp</java.io.tmpdir>
<project.basedir>${project.basedir}</project.basedir>
<arquillian.xml>rest-arquillian.xml</arquillian.xml>
<glassfish.debug>true</glassfish.debug>
<glassfish.suspend>false</glassfish.suspend>
</systemPropertyVariables>
<environmentVariables>
<GLASSFISH_HOME>${project.build.directory}/${glassfish.toplevel.dir}</GLASSFISH_HOME>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ public class ServletEMLookupTest {
@ArquillianResource
URL contextPath;

@Deployment(name = "rest-em-lookup", testable = false)
@Deployment(name = "jpa-cdi-em-inject", testable = false)
public static WebArchive deployment(@ArquillianResource TestArchiveProcessor archiveProcessor) {
WebArchive war = ShrinkWrap.create(WebArchive.class, "rest-em-lookup.war")
WebArchive war = ShrinkWrap.create(WebArchive.class)
.addClasses(CtsEmQualifier.class, CtsEmNoTxQualifier.class, JaxRsActivator.class,
TestBeanEM.class, RestEndpoint.class);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import jakarta.inject.Inject;
import jakarta.enterprise.context.RequestScoped;
import jakarta.persistence.EntityManager;
import jakarta.persistence.PersistenceContext;

import java.util.logging.Logger;

Expand All @@ -13,12 +14,12 @@
public class TestBeanEM {
Logger logger = Logger.getLogger(TestBeanEM.class.getName());

//@PersistenceUnit(unitName = "CTS-EM")
@CtsEmQualifier
@Inject
@PersistenceContext(unitName = "CTS-EM")
//@CtsEmQualifier
//@Inject
private EntityManager em1;
//@PersistenceUnit(unitName = "CTS-EM-NOTX")
@CtsEmNoTxQualifier
//@PersistenceContext(unitName = "CTS-EM2")
@CtsEmQualifier
@Inject
private EntityManager em2;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,14 @@
</persistence-unit>
<persistence-unit name="CTS-EM2" transaction-type="JTA">
<description>Persistence Unit for CTS Vehicle Tests</description>
<qualifier>ee.jakarta.tck.persistence.ee.cdi.CtsEmQualifier</qualifier>
<jta-data-source>jdbc/DB1</jta-data-source>
<class>ee.jakarta.tck.persistence.ee.entityManager.Order</class>
</persistence-unit>
<persistence-unit name="CTS-EM-NOTX" transaction-type="RESOURCE_LOCAL">
<description>The persistence.xml file may be used to designate
more than one persistence unit within the same scope.
Persistence Unit for Application Managed Resource Local</description>
<qualifier>ee.jakarta.tck.persistence.ee.cdi.CtsEmNoTxQualifier</qualifier>
<non-jta-data-source>jdbc/DB_no_tx</non-jta-data-source>
<class>ee.jakarta.tck.persistence.ee.entityManager.Order</class>
</persistence-unit>
Expand Down

0 comments on commit e681a16

Please sign in to comment.