Skip to content

Enable integration tests to run by default#420

Closed
volosied wants to merge 1 commit intoapache:mainfrom
volosied:reenble-integration-tests
Closed

Enable integration tests to run by default#420
volosied wants to merge 1 commit intoapache:mainfrom
volosied:reenble-integration-tests

Conversation

@volosied
Copy link
Copy Markdown
Contributor

@volosied volosied commented Dec 10, 2022

PR created to verify CI build.

Enabled per Thomas' request here: #412 (comment)

@volosied
Copy link
Copy Markdown
Contributor Author

Failed due to some runtime environment problem...?

Error:  Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 10.639 s <<< FAILURE! - in org.apache.myfaces.core.integrationtests.IntegrationTest
Error:  org.apache.myfaces.core.integrationtests.IntegrationTest  Time elapsed: 10.638 s  <<< ERROR!
java.lang.RuntimeException: Could not invoke deployment method: public static org.jboss.shrinkwrap.api.spec.WebArchive org.apache.myfaces.core.integrationtests.IntegrationTest.createDeployment()
	at org.apache.myfaces.core.integrationtests.IntegrationTest.createDeployment(IntegrationTest.java:50)

@volosied volosied marked this pull request as draft December 10, 2022 16:13
@tandraschko
Copy link
Copy Markdown
Member

weird, works on localhsot
@melloware would you like to check it?

@melloware
Copy link
Copy Markdown
Contributor

I can take a look.

@melloware
Copy link
Copy Markdown
Contributor

melloware commented Dec 15, 2022

@tandraschko here is the error I am getting locally. I had to update some JARS just to get this far in Inegration tests but it seems like some kind of Tomcat servlet mismatch.

org.apache.catalina.core.ApplicationSessionCookieConfig 
does not define or inherit an implementation of the resolved method 
abstract java.lang.String getAttribute(java.lang.String)' of interface jakarta.servlet.SessionCookieConfig.

Full stack:

SEVERE: Servlet.service() for servlet [FacesServlet] in context with path [/faceletToXhtmlMapping-4.0.0-SNAPSHOT] threw exception [Receiver class org.apache.catalina.core.ApplicationSessionCookieConfig does not define or inherit an implementation of the resolved method 'abstract java.lang.String getAttribute(java.lang.String)' of interface jakarta.servlet.SessionCookieConfig.] with root cause
java.lang.AbstractMethodError: Receiver class org.apache.catalina.core.ApplicationSessionCookieConfig does not define or inherit an implementation of the resolved method 'abstract java.lang.String getAttribute(java.lang.String)' of interface jakarta.servlet.SessionCookieConfig.
        at org.apache.myfaces.context.flash.FlashImpl._createFlashCookie(FlashImpl.java:1194)
        at org.apache.myfaces.context.flash.FlashImpl._saveRenderFlashMapTokenForNextRequest(FlashImpl.java:774)
        at org.apache.myfaces.context.flash.FlashImpl._manageFlashMapTokens(FlashImpl.java:889)
        at org.apache.myfaces.context.flash.FlashImpl.doPrePhaseActions(FlashImpl.java:197)
        at org.apache.myfaces.lifecycle.LifecycleImpl.executePhase(LifecycleImpl.java:155)
        at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:125)
        at jakarta.faces.webapp.FacesServlet.service(FacesServlet.java:223)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:224)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:159)
        at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)

@melloware
Copy link
Copy Markdown
Contributor

Must be some kind of servlet mismatch between API level and what Tomcat is implementing because this is returning true.

    private static Lazy<Boolean> sevlet6Available = new Lazy<>(() ->
    {
        boolean available;
        try
        {
            available = jakarta.servlet.SessionCookieConfig.class.getMethod("getAttribute", String.class) != null;
        }
        catch (Throwable t)
        {
            available = false;
        }
        log.info("MyFaces Core Servlet 6.0 support " + (available ? "enabled" : "disabled"));

        return available;
    });

@volosied volosied force-pushed the reenble-integration-tests branch 3 times, most recently from 52214a7 to fc0b720 Compare December 15, 2022 18:02
@volosied
Copy link
Copy Markdown
Contributor Author

Closing in favor of Melloware's PR.

@volosied volosied closed this Dec 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants