Skip to content

Commit

Permalink
Fixes in the CDI Lang Model TCK
Browse files Browse the repository at this point in the history
 - enable Java assertions for managed GlassFish as required by the TCK (-ea)
 - add the whole org.jboss.cdi.lang.model.tck package to the test deployment (otherwise getting ClassNotFoundException from Weld)
The test still fails inside the LangModelExtension - deployment fails with `IllegalAccessException: class org.jboss.weld.resources.DefaultReflectionCache$AnnotationClassImpl cannot access a member of interface`
Signed-off-by:Ondro Mihalyi <mihalyi@omnifish.ee>
  • Loading branch information
OndroMih committed Jul 7, 2022
1 parent 660e892 commit dfb11d2
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 42 deletions.
41 changes: 0 additions & 41 deletions glassfish-runner/cdi-model-tck/pom.xml
Expand Up @@ -205,47 +205,6 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>3.0.0-M7</version>
<executions>
<execution>
<id>integration-test</id>
<goals>
<goal>integration-test</goal>
<goal>verify</goal>
</goals>
</execution>
</executions>
<configuration>
<argLine>-Xmx768m</argLine>
<dependenciesToScan>
<dependency>jakarta.enterprise:cdi-tck-lang-model</dependency>
</dependenciesToScan>
<properties>
<property>
<name>surefire.testng.verbose</name>
<value>1</value>
</property>
</properties>
<forkMode>once</forkMode>
<!-- System Properties -->
<systemPropertyVariables>
<glassfish.home>${glassfish.root}/glassfish7</glassfish.home>
<glassfish.enableDerby>true</glassfish.enableDerby>
<glassfish.maxHeapSize>2048m</glassfish.maxHeapSize>
<glassfish.enableAssertions>:org.jboss.cdi.tck...</glassfish.enableAssertions>
<glassfish.systemProperties>
cdiTckExcludeDummy=true
glassfish.servlet.loadAllOnStartup=true
</glassfish.systemProperties>
<libPath>${project.build.outputDirectory}</libPath>
<org.jboss.cdi.tck.libraryDirectory>${project.build.directory}/dependency/lib</org.jboss.cdi.tck.libraryDirectory>
<debugMode>true</debugMode>
</systemPropertyVariables>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-report-plugin</artifactId>
Expand Down
Expand Up @@ -21,6 +21,7 @@
import jakarta.enterprise.lang.model.declarations.ClassInfo;
import org.jboss.arquillian.container.test.api.Deployment;
import org.jboss.arquillian.junit.Arquillian;
import org.jboss.cdi.lang.model.tck.AnnotatedTypes;
import org.jboss.cdi.lang.model.tck.LangModelVerifier;
import org.jboss.shrinkwrap.api.Archive;
import org.jboss.shrinkwrap.api.BeanDiscoveryMode;
Expand Down Expand Up @@ -52,7 +53,7 @@ public static Archive<?> deploy() {
.addAsWebInfResource(new BeansXml(BeanDiscoveryMode.ALL), "beans.xml")
.addAsServiceProvider(BuildCompatibleExtension.class, LangModelExtension.class)
// add this class into the deployment so that it's subject to discovery
.addClasses(LangModelVerifier.class)
.addPackage(LangModelVerifier.class.getPackage())
.addClasses(LangModelExtension.class);

}
Expand Down
Expand Up @@ -24,7 +24,9 @@
<property name="adminUser">admin</property>
<property name="adminPassword"></property>
<property name="glassFishHome">./target/glassfish7</property>
<!--<property name="suspend">true</property>-->
<property name="allowConnectingToRunningServer">true</property>
<property name="enableAssertions"></property>
<!-- Add additional properties for your container impl -->
</configuration>
</container>
Expand Down

0 comments on commit dfb11d2

Please sign in to comment.