Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Restore skipped tests in TomEE profile (due to HtmlUnit failure) - was "Restore TomEE support in test suite" #242

Open
WolfgangHG opened this issue Oct 14, 2024 · 6 comments · Fixed by #243

Comments

@WolfgangHG
Copy link
Contributor

@rhusar I struggled a bit with TomEE.

Version 9.1 supports only JakartaEE 9.1 (https://tomee.apache.org/comparison.html)
There is at least one test that fails (org.jboss.arquillian.warp.jsf.ftest.redirection.TestJsfRedirect), because the jsf pages fail on TomEE 9 with the current JakartaEE 10 namespaces and work only with the JakartaEE 9 namespaces (xmlns:ui="http://xmlns.jcp.org/jsf/facelets" instead of xmlns:ui="jakarta.faces.facelets"). And this would break WildFly and JakartaEE 10.

So we would have to switch to version 10.0, which is still in development (currently: M2) and supports JakartaEE 10. But it requires Java 17.

This is only a matter of the test suite, arquillian-extension-warp could probably be built with Java 11. But we would have to run the "tomee-managed" profile with Java 17. Would this be possible with Github CI and would this be OK for you?

In the moment I observe a HTMLUnit javascript parse error in org.jboss.arquillian.warp.jsf.ftest.producer.TestJSFTestEnrichers - might be caused by the fact that TomEE uses MyFaces, while WildFly used Mojarra. Will have to dig further...

@rhusar
Copy link
Collaborator

rhusar commented Oct 14, 2024

@rhusar I struggled a bit with TomEE.

:(

Version 9.1 supports only JakartaEE 9.1 (https://tomee.apache.org/comparison.html) There is at least one test that fails (org.jboss.arquillian.warp.jsf.ftest.redirection.TestJsfRedirect), because the jsf pages fail on TomEE 9 with the current JakartaEE 10 namespaces and work only with the JakartaEE 9 namespaces (xmlns:ui="http://xmlns.jcp.org/jsf/facelets" instead of xmlns:ui="jakarta.faces.facelets"). And this would break WildFly and JakartaEE 10.

Uh, Jakarta EE 9 is not exactly useful and not worth supporting here at this point in time.

So we would have to switch to version 10.0, which is still in development (currently: M2) and supports JakartaEE 10. But it requires Java 17.

M2 release is fine with me and also JDK 17 is fine.

This is only a matter of the test suite, arquillian-extension-warp could probably be built with Java 11. But we would have to run the "tomee-managed" profile with Java 17. Would this be possible with Github CI and would this be OK for you?

Yes - that's not a problem at all - we would just exclude that one from the matrix (11 and tomee-managed).

In the moment I observe a HTMLUnit javascript parse error in org.jboss.arquillian.warp.jsf.ftest.producer.TestJSFTestEnrichers - might be caused by the fact that TomEE uses MyFaces, while WildFly used Mojarra. Will have to dig further...

No idea there yet, but I see how this might be causing an issue. Can be conditionally ignore if needs be.

🔨 🔨 🔨

@WolfgangHG
Copy link
Contributor Author

OK!
Will stop for now and continue the next few days...

@WolfgangHG
Copy link
Contributor Author

I added a "maven-enforcer-plugin" rule to the "tomee-managed" profile to ensure Java 17.

About the changes:
Change 1: the test "TestFacesLifecycleFailurePropagation" required some workarounds (#108 (comment)) because a ServletException was deserialized from TomEE, and the ServletException class on the client side declared a different SerialVersionUID than the class on the server side.
Those workarounds got worse with 10.0: the dependency "org.apache.tomcat:tomcat-servlet-api" must be declared before "org.apache.tomee:arquillian-tomee-remote", because the latter brings "org.apache.tomee:jakartaee-api", which also contains a "ServletException", but with a different SerialVersionUID. Thus the "InvalidClassException" would occur. If we declare the servlet api jar before the arquillian jar, the ServletException class is loaded from there.
Just for the records: https://issues.apache.org/jira/browse/TOMEE-4418 (but not fixable on the TomEE side)

Change 2: updated several deployment descriptors and Faces pages to the JakartaEE 10 versions/namespaces.

Problem: most of the "jsf-ftest" tests will not run. The reason is a java script parse error in HtmlUnit: HtmlUnit/htmlunit#883
This happens for TomEE, because it bundles MyFaces, while WildFly has Mojarra.
As long as this is not fixed, we cannot enable the TomEE profile in CI.

@WolfgangHG
Copy link
Contributor Author

Six test that would fail because of the HtmlUnit javascript parse error were excluded with this code snippet:

    @BeforeClass
    public static void beforeClass() throws IOException, InterruptedException {
       String tomEEHome = (String) System.getProperty("tomee.home");
       Assume.assumeTrue(tomEEHome == null || tomEEHome.length() == 0);
    }
  • org.jboss.arquillian.warp.jsf.ftest.BasicJsfTest
  • org.jboss.arquillian.warp.jsf.ftest.failure.TestInspectionFailurePropagation
  • org.jboss.arquillian.warp.jsf.ftest.lifecycle.TestJsfLifecycle
  • org.jboss.arquillian.warp.jsf.ftest.producer.TestJSFInstanceProducers
  • org.jboss.arquillian.warp.jsf.ftest.producer.TestJSFResourceProviders
  • org.jboss.arquillian.warp.jsf.ftest.producer.TestJSFTestEnrichers

This has to be reverted if the HtmlUnit problem is fixed.

@WolfgangHG
Copy link
Contributor Author

@rhusar Could we keep this open as a reminder to restore the tests if HtmlUnit has fixed the issue? Otherwise I could create a new issue.

@rhusar
Copy link
Collaborator

rhusar commented Oct 18, 2024

@rhusar Could we keep this open as a reminder to restore the tests if HtmlUnit has fixed the issue? Otherwise I could create a new issue.

I see - that is done automatically by GitHub, not by me, without any notification to me.

Ok - let's keep this one with more context, reopening. You can update the title/description with the html unit issue.

@rhusar rhusar reopened this Oct 18, 2024
@WolfgangHG WolfgangHG changed the title Restore TomEE support in test suite Restore skipped tests in TomEE profile (due to HtmlUnit failure) - was "Restore TomEE support in test suite" Oct 18, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
2 participants