Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Faces TCK test failure with Glassfish7 M5 #23960

Closed
alwin-joseph opened this issue May 31, 2022 · 5 comments
Closed

Faces TCK test failure with Glassfish7 M5 #23960

alwin-joseph opened this issue May 31, 2022 · 5 comments
Labels
ee10-tck EE 10 TCK failures
Milestone

Comments

@alwin-joseph
Copy link

Environment Details

  • GlassFish Version - 7.0.0- M5 (Full profile and web profile)
  • JDK version: JDK11

Problem Description

Test failures in Faces TCK(https://download.eclipse.org/ee4j/jakartaee-tck/jakartaee10/staged/eftl/jakarta-faces-tck-4.0.0.zip) when run against Glassfish 7.0.0-M5 :

Problem is easily reproducible

  1. ee.jakarta.tck.faces.test.servlet30.ajax.Issue1817IT.testAjaxUIRepeat

Source of test : https://github.com/jakartaee/faces/blob/master/tck/faces22/ajax/src/test/java/ee/jakarta/tck/faces/test/servlet30/ajax/Issue1817IT.java

Exception

[ERROR] ee.jakarta.tck.faces.test.servlet30.ajax.Issue1817IT.testAjaxUIRepeat  Time elapsed: 0.107 s  <<< ERROR!
com.gargoylesoftware.htmlunit.ScriptException: Error: faces.ajax.request: Form has no view state element (http://localhost:8080/test-faces22-ajax194292116820722628/jakarta.faces.resource/faces.js.xhtml?ln=jakarta.faces#1)
	at ee.jakarta.tck.faces.test.servlet30.ajax.Issue1817IT.testAjaxUIRepeat(Issue1817IT.java:45)
Caused by: net.sourceforge.htmlunit.corejs.javascript.JavaScriptException: Error: faces.ajax.request: Form has no view state element (http://localhost:8080/test-faces22-ajax194292116820722628/jakarta.faces.resource/faces.js.xhtml?ln=jakarta.faces#1)
	at ee.jakarta.tck.faces.test.servlet30.ajax.Issue1817IT.testAjaxUIRepeat(Issue1817IT.java:45)
  1. failure in websocket module (intermittent failure)
    Source of test : https://github.com/jakartaee/faces/blob/master/tck/faces23/websocket/src/test/java/ee/jakarta/tck/faces/test/javaee8/websocket/Issue4332IT.java
[INFO] Running ee.jakarta.tck.faces.test.javaee8.websocket.Issue4332IT
May 24, 2022 8:48:53 PM com.gargoylesoftware.htmlunit.javascript.host.WebSocket onWebSocketConnectError
SEVERE: WS connect error for url 'ws://localhost:8080/test-faces23-websocket/jakarta.faces.push/push?f1a5fa95-499d-42d6-964c-246c37cb5b4d':
java.util.concurrent.ExecutionException: org.eclipse.jetty.websocket.api.UpgradeException: Failed to upgrade to websocket: Unexpected HTTP Response Status Code: 404 Not Found
	at java.base/java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:395)
	at java.base/java.util.concurrent.CompletableFuture.get(CompletableFuture.java:1999)
	at com.gargoylesoftware.htmlunit.websocket.JettyWebSocketAdapter.lambda$connect$0(JettyWebSocketAdapter.java:95)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:871)
Caused by: org.eclipse.jetty.websocket.api.UpgradeException: Failed to upgrade to websocket: Unexpected HTTP Response Status Code: 404 Not Found
	at org.eclipse.jetty.websocket.client.WebSocketUpgradeRequest.onComplete(WebSocketUpgradeRequest.java:537)
	at org.eclipse.jetty.client.ResponseNotifier.notifyComplete(ResponseNotifier.java:218)
	at org.eclipse.jetty.client.ResponseNotifier.notifyComplete(ResponseNotifier.java:210)
	at org.eclipse.jetty.client.HttpReceiver.terminateResponse(HttpReceiver.java:481)
	at org.eclipse.jetty.client.HttpReceiver.terminateResponse(HttpReceiver.java:461)
	at org.eclipse.jetty.client.HttpReceiver.responseSuccess(HttpReceiver.java:424)
	at org.eclipse.jetty.client.http.HttpReceiverOverHTTP.messageComplete(HttpReceiverOverHTTP.java:365)
	at org.eclipse.jetty.http.HttpParser.handleContentMessage(HttpParser.java:597)
	at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:1603)
	at org.eclipse.jetty.client.http.HttpReceiverOverHTTP.shutdown(HttpReceiverOverHTTP.java:259)
	at org.eclipse.jetty.client.http.HttpReceiverOverHTTP.process(HttpReceiverOverHTTP.java:181)
	at org.eclipse.jetty.client.http.HttpReceiverOverHTTP.receive(HttpReceiverOverHTTP.java:79)
	at org.eclipse.jetty.client.http.HttpChannelOverHTTP.receive(HttpChannelOverHTTP.java:131)
	at org.eclipse.jetty.client.http.HttpConnectionOverHTTP.onFillable(HttpConnectionOverHTTP.java:172)
	at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311)
	at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:105)
	at org.eclipse.jetty.io.ChannelEndPoint$1.run(ChannelEndPoint.java:104)
	... 3 more

[ERROR] Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 5.757 s <<< FAILURE! - in ee.jakarta.tck.faces.test.javaee8.websocket.Issue4332IT
[ERROR] ee.jakarta.tck.faces.test.javaee8.websocket.Issue4332IT.testWebsocketAfterPostback  Time elapsed: 3.209 s  <<< FAILURE!
java.lang.AssertionError: Failed to establish connection with websocket within 3 seconds.
	at ee.jakarta.tck.faces.test.javaee8.websocket.Issue4332IT.testWebsocketAfterPostback(Issue4332IT.java:74)

Steps to reproduce

  1. wget -q https://download.eclipse.org/ee4j/jakartaee-tck/jakartaee10/staged/eftl/jakarta-faces-tck-4.0.0.zip
  2. unzip jakarta-faces-tck-4.0.0.zip ; cd jakarta-faces-tck-4.0.0
  3. mvn clean install -DskipOldTCK=true -pl -:websocket -DskipAssembly=true -Pstaging,glassfish-ci-managed -Dglassfish.version=7.0.0-M5 -Dmojarra.version=4.0.0-M7 surefire-report:failsafe-report-only -Daggregate=true | tee /run.log

Impact of Issue

Affects the successful completion of #23950

@arjantijms
Copy link
Contributor

After some discussion it seems the recommended action is to disable all those failing tests for the upcoming 4.0.1 service release of the TCK.

It appears the new way of testing web socket and Ajax is not sound enough and we'll have to revisit this later.

This shouldn't diminish test coverage as these items should be tested by the old TCK as well.

Cc @BalusC @tandraschko

@alwin-joseph
Copy link
Author

alwin-joseph commented Jun 1, 2022

An update with the test runs on glassfish nightly :

  • 4 websocket failures , ajax did pass with nightly glassfish bundle
[ERROR] Tests run: 4, Failures: 3, Errors: 0, Skipped: 0, Time elapsed: 25.589 s <<< FAILURE! - in ee.jakarta.tck.faces.test.javaee8.websocket.Spec1396IT
[ERROR] ee.jakarta.tck.faces.test.javaee8.websocket.Spec1396IT.testViewScopedWebsocket  Time elapsed: 4.914 s  <<< FAILURE!
java.lang.AssertionError: Failed to establish connection with websocket within 3 seconds.
	at ee.jakarta.tck.faces.test.javaee8.websocket.Spec1396IT.waitUntilWebsocketIsOpened(Spec1396IT.java:151)
	at ee.jakarta.tck.faces.test.javaee8.websocket.Spec1396IT.testViewScopedWebsocket(Spec1396IT.java:130)

[ERROR] ee.jakarta.tck.faces.test.javaee8.websocket.Spec1396IT.testUserScopedWebsocket  Time elapsed: 3.141 s  <<< FAILURE!
java.lang.AssertionError: Failed to establish connection with websocket within 3 seconds.
	at ee.jakarta.tck.faces.test.javaee8.websocket.Spec1396IT.waitUntilWebsocketIsOpened(Spec1396IT.java:151)
	at ee.jakarta.tck.faces.test.javaee8.websocket.Spec1396IT.testUserScopedWebsocket(Spec1396IT.java:108)

[ERROR] ee.jakarta.tck.faces.test.javaee8.websocket.Spec1396IT.testDefaultWebsocket  Time elapsed: 3.114 s  <<< FAILURE!
java.lang.AssertionError: Failed to establish connection with websocket within 3 seconds.
	at ee.jakarta.tck.faces.test.javaee8.websocket.Spec1396IT.waitUntilWebsocketIsOpened(Spec1396IT.java:151)
	at ee.jakarta.tck.faces.test.javaee8.websocket.Spec1396IT.testDefaultWebsocket(Spec1396IT.java:86).

[ERROR] Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 5.525 s <<< FAILURE! - in ee.jakarta.tck.faces.test.javaee8.websocket.Issue4332IT
[ERROR] ee.jakarta.tck.faces.test.javaee8.websocket.Issue4332IT.testWebsocketAfterPostback  Time elapsed: 3.21 s  <<< FAILURE!
java.lang.AssertionError: Failed to establish connection with websocket within 3 seconds.
	at ee.jakarta.tck.faces.test.javaee8.websocket.Issue4332IT.testWebsocketAfterPostback(Issue4332IT.java:74)

We will wait for 4.0.1 Faces TCK release to be used for JakartaEE 10 Certification.

@arjantijms
Copy link
Contributor

Faces TCK 4.0.1 (staged) now running against Mojarra 4.0.0 on the Mojarra CI.

@alwin-joseph
Copy link
Author

Faces TCK 4.0.1 (staged) now running against Mojarra 4.0.0 on the Mojarra CI.

I am running the staged Faces TCK 4.0.1 (https://download.eclipse.org/faces/jakartaee10/staged/eftl/jakarta-faces-tck-4.0.1.zip ) against latest Glassfish using https://ci.eclipse.org/jakartaee-tck/job/10/job/jakarta-faces-tck-glassfish-run/32/. There are no failing tests till now (all new tests seem to pass) for full profile + JDK11.

Below mvn command was used after installing nightly glassfish as 7.0.0-M5 version to run the complete set of tests(old and new). Please correct the test run command if required.

cd faces-tck-4.0.1/tck
mvn clean install -Pstaging,glassfish-ci-managed -Dglassfish.version=7.0.0-M5 surefire-report:failsafe-report-only -Daggregate=true | tee $WORKSPACE/run.log

Also I intend to run the test with glassfish web profile by replacing glassfish artifact id with web artifact id for org.glassfish.main.distributions in faces-tck-4.0.1/tck/pom.xml as below. Please suggest if any corrections needed.
sed -i.bak "s#<artifactId>glassfish</artifactId>#<artifactId>web</artifactId>#g" pom.xml

@alwin-joseph
Copy link
Author

alwin-joseph commented Jun 15, 2022

The latest staged Faces TCK 4.0.1 (https://download.eclipse.org/faces/jakartaee10/staged/eftl/jakarta-faces-tck-4.0.1.zip ) passes all the required tests against glassfish nightly.

JDK11 full profile run : https://ci.eclipse.org/jakartaee-tck/job/10/job/jakarta-faces-tck-glassfish-run/40/
JDK11 Web Profile run : https://ci.eclipse.org/jakartaee-tck/job/10/job/jakarta-faces-tck-glassfish-run/39/
JDK17 Full profile run : https://ci.eclipse.org/jakartaee-tck/job/10/job/jakarta-faces-tck-glassfish-run-jdk17/1/
JDK17 Web profile run : https://ci.eclipse.org/jakartaee-tck/job/10/job/jakarta-faces-tck-glassfish-run-jdk17/2

Test count details in summary.txt

New TCK :


Completed running 261 tests.
Number of Tests Failed = 0
Number of Tests with Errors = 0


Old TCK :
[INFO] [exec] [javatest.batch] Number of Tests Passed = 5399
[INFO] [exec] [javatest.batch] Number of Tests Failed = 0
[INFO] [exec] [javatest.batch] Number of Tests with Errors = 0

@dmatej dmatej added this to the 7.0.0 milestone Jul 24, 2022
@dmatej dmatej closed this as completed Jul 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ee10-tck EE 10 TCK failures
Projects
None yet
Development

No branches or pull requests

4 participants