Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[jakartaee-tck-dev] Did GlassFish ever pass ContainerEventTest#testProcessInjectionTargetEventFiredForTagHandler

Hi,

There's an amount of tests in the CDI TCK quite mysteriously failing for GlassFish (which uses Weld).

Some of them are quite unexpected, as they are a decade olds tests. For instance, consider

org.jboss.cdi.tck.tests.extensions.lifecycle.processInjectionTarget.ContainerEventTest#testProcessInjectionTargetEventFiredForTagHandler

This tests whether a JspTag instance is injected. This sounds reasonable, but seemingly a JspTag in GlassFish is never created during boot, but only lazily via generated code in a JSP, i.e. the following:

   out.pushIndent();
        for (String tagHandlerPoolName : tagHandlerPoolNames) {
            out.printin(tagHandlerPoolName);
            out.print(" = org.glassfish.wasp.runtime.TagHandlerPool.getTagHandlerPool(");
            if (ctxt.isTagFile()) {
                out.print("config");
            } else {
                out.print("getServletConfig()");
            }
            out.println(");");
        }

The test creates this deployment:

 @Deployment
    public static WebArchive createTestArchive() {
        return new WebArchiveBuilder().withTestClassPackage(ContainerEventTest.class)
                .withExtension(ProcessInjectionTargetObserver.class)
                .withWebResource("faces-config.xml", "/WEB-INF/faces-config.xml")
                .withWebResource("TestLibrary.tld", "WEB-INF/TestLibrary.tld").build();
    }

And the test is this:

 @Test(groups = INTEGRATION)
    @SpecAssertions({ @SpecAssertion(section = PROCESS_INJECTION_TARGET_EE, id = "aad"), @SpecAssertion(section = PROCESS_INJECTION_TARGET_EE, id = "abd"),
            @SpecAssertion(section = BEAN_DISCOVERY_STEPS_EE, id = "bf") })
    public void testProcessInjectionTargetEventFiredForTagHandler() {
        assertNotNull(ProcessInjectionTargetObserver.getTagHandlerEvent());
    }

There's no .jsp file in the archive, and there is no .jsp file called. I can probably rebuild some parts of GlassFish to instantiate JSP tags eagerly to pass this test, but I wonder mostly how this could have ever worked and passed before?

Maybe I'm missing something and that tests or its family were somehow excluded?

Thoughts?

Kind regards,
Arjan Tijms




Back to the top