Uploaded image for project: 'WildFly'
  1. WildFly
  2. WFLY-19532

Add testable=false to testsuite/integration/microprofile deployments used in @RunAsClient tests

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Done
    • Icon: Minor Minor
    • 33.0.0.Final
    • None
    • Test Suite
    • None

      Look for things like the following in https://ci.wildfly.org/repository/download/WF_PullRequest_LinuxJdk17/444625:id/testsuite/integration/microprofile/target/wildfly/standalone/log/server.log (or a later variant of the same file once this one gets purged by TeamCity.)

      2024-07-11 06:11:44,704 WARN  [org.jboss.modules.define] (Weld Thread Pool -- 2) Failed to define class org.wildfly.test.integration.microprofile.health.MicroProfileHealthApplicationLiveHTTPEndpointTestCase in Module "deployment.MicroProfileHealthTestCase.war" from Service Module Loader: java.lang.NoClassDefFoundError: Failed to link org/wildfly/test/integration/microprofile/health/MicroProfileHealthApplicationLiveHTTPEndpointTestCase (Module "deployment.MicroProfileHealthTestCase.war" from Service Module Loader): org/wildfly/test/integration/microprofile/health/MicroProfileHealthApplicationLiveTestBase
      	at java.base/java.lang.ClassLoader.defineClass1(Native Method)
      	at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1017)
      	at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1095)
      	at org.jboss.modules.ModuleClassLoader.doDefineOrLoadClass(ModuleClassLoader.java:351)
      	at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:482)
      	at org.jboss.modules.ModuleClassLoader.loadClassLocal(ModuleClassLoader.java:276)
      	at org.jboss.modules.ModuleClassLoader$1.loadClassLocal(ModuleClassLoader.java:79)
      	at org.jboss.modules.Module.loadModuleClass(Module.java:798)
      	at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:192)
      	at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:408)
      	at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:396)
      	at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:115)
      	at org.jboss.as.weld@33.0.0.Final-SNAPSHOT//org.jboss.as.weld.WeldModuleResourceLoader.classForName(WeldModuleResourceLoader.java:51)
      	at org.jboss.weld.core@5.1.2.Final//org.jboss.weld.bootstrap.AnnotatedTypeLoader.loadClass(AnnotatedTypeLoader.java:86)
      	at org.jboss.weld.core@5.1.2.Final//org.jboss.weld.bootstrap.AnnotatedTypeLoader.loadAnnotatedType(AnnotatedTypeLoader.java:65)
      	at org.jboss.weld.core@5.1.2.Final//org.jboss.weld.bootstrap.FastAnnotatedTypeLoader.loadAnnotatedType(FastAnnotatedTypeLoader.java:112)
      	at org.jboss.weld.core@5.1.2.Final//org.jboss.weld.bootstrap.BeanDeployer.addClass(BeanDeployer.java:87)
      	at org.jboss.weld.core@5.1.2.Final//org.jboss.weld.bootstrap.ConcurrentBeanDeployer$1.doWork(ConcurrentBeanDeployer.java:55)
      	at org.jboss.weld.core@5.1.2.Final//org.jboss.weld.bootstrap.ConcurrentBeanDeployer$1.doWork(ConcurrentBeanDeployer.java:52)
      	at org.jboss.weld.core@5.1.2.Final//org.jboss.weld.executor.IterativeWorkerTaskFactory$1.call(IterativeWorkerTaskFactory.java:62)
      	at org.jboss.weld.core@5.1.2.Final//org.jboss.weld.executor.IterativeWorkerTaskFactory$1.call(IterativeWorkerTaskFactory.java:55)
      	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
      	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
      	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
      	at java.base/java.lang.Thread.run(Thread.java:840)
      	at org.jboss.threads@2.4.0.Final//org.jboss.threads.JBossThread.run(JBossThread.java:513)
      Caused by: java.lang.ClassNotFoundException: org.wildfly.test.integration.microprofile.health.MicroProfileHealthApplicationLiveTestBase from [Module "deployment.MicroProfileHealthTestCase.war" from Service Module Loader]
      	at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:200)
      	at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:408)
      	at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:396)
      	at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:115)
      	... 26 more
      

      This happens because MicroProfileHealthApplicationLiveHTTPEndpointTestCase is a @RunAsClient test and thus doesn't package client-side resources (like its parent class) in its deployment. But the missing 'deployment=false' means ARQ injects MicroProfileHealthApplicationLiveHTTPEndpointTestCase itself into the deployment archive, with the result that the server ends up processing a spurious class.

      Cleaning this up is a bit of housekeeping to avoid having scary looking noise in the log that may distract a future maintainer trying to debug some test failure.

              bstansbe@redhat.com Brian Stansberry
              bstansbe@redhat.com Brian Stansberry
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: