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

Prepare new Faces TCK #1600

Closed
6 of 12 tasks
arjantijms opened this issue Jan 24, 2022 · 92 comments
Closed
6 of 12 tasks

Prepare new Faces TCK #1600

arjantijms opened this issue Jan 24, 2022 · 92 comments
Assignees

Comments

@arjantijms
Copy link
Contributor

arjantijms commented Jan 24, 2022

Prepare a new Faces TCK by

  1. Copying https://github.com/eclipse-ee4j/mojarra/tree/master/test2 to /tck in this project.
  2. Changing package names to ee.jakarta.tck
  3. Adding comments to test in https://github.com/jakartaee/faces/tree/master/tck
    (see Describe steps necessary to help out with TCK eclipse-ee4j/mojarra#5046)
    • Faces22
    • Faces23 - Bauke/BalusC
    • Faces40
  4. Move additional tests from https://github.com/eclipse-ee4j/mojarra/tree/3.0/test
  5. Where needed, add assertion IDs (on hold, nobody understands this)
    (see Prepare new Faces TCK #1600 (comment))
  6. Incorporating the existing TCK from https://github.com/eclipse-ee4j/jakartaee-tck and disabling whatever doesn't work anymore (?)
    (For example, see https://github.com/arjantijms/glassfish/blob/master/appserver/tests/tck/faces/pom.xml)
  7. Creating single zip distribution of the entire TCK
  8. Create / update guide / docs on how to run the TCK
  9. Adding example to run TCK as dependency from Maven into your own pom.
    (see https://github.com/piranhacloud/piranha/tree/current/external/tck/jwt)
    • Arjan

cc @BalusC @scottmarlow @mriem

@scottmarlow
Copy link

  1. Copying the (not yet updated for 4.0) Faces TCK user guide from https://github.com/eclipse-ee4j/jakartaee-tck/tree/master/user_guides/jsf. The Platform TCK install guide could also be copied or merged with existing test2/README.md.
  2. Signature testing tooling is needed (e.g. TCK Migration: Move standalone jaxrs tck signature tests from jakartaee-tck rest#1044).

CC @alwin-joseph @gurunrao

@starksm64
Copy link
Contributor

I can help, the question is how to partition the work.

@arjantijms
Copy link
Contributor Author

@starksm64 easiest I think by just taking ownership of one of the items. If you can mention the item here, e.g. 1, then everyone knows you'll be looking at that one.

@starksm64
Copy link
Contributor

Ok.

@starksm64
Copy link
Contributor

@arjantijms for 1, do you want that test2 module added as a new tck module?

@arjantijms
Copy link
Contributor Author

@starksm64 Indeed, the regular /tck folder. This TCK btw does not have the kind of split that Jakarta REST has. We still need to see what the best way is for vendors to add their own connector.

@starksm64
Copy link
Contributor

Ok, I'll take item 1. and create a PR for it.

@starksm64
Copy link
Contributor

Should the tests be passing? I have copied test over and made the group name consistent, but I see the first test that are run failing. I do see the same com.sun.faces.test.javaee7.cdibeanvalidator.Issue3014IT fail in the mojarra/test2 main brach as well:

[INFO] -------------------------------------------------------
[INFO] Running com.sun.faces.test.javaee7.cdibeanvalidator.Issue3014IT
Starting container using command: [/Library/Java/JavaVirtualMachines/jdk-11.0.13.jdk/Contents/Home/bin/java, -jar, /Users/starksm/Dev/JBoss/Jakarta/rh-faces/target/glassfish7/glassfish/modules/admin-cli.jar, start-domain, -t]
Successfully started the domain : domain1
domain  Location: /Users/starksm/Dev/JBoss/Jakarta/rh-faces/target/glassfish7/glassfish/domains/domain1
Log File: /Users/starksm/Dev/JBoss/Jakarta/rh-faces/target/glassfish7/glassfish/domains/domain1/logs/server.log
Admin Port: 4848
[ERROR] Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 12.132 s <<< FAILURE! - in com.sun.faces.test.javaee7.cdibeanvalidator.Issue3014IT
[ERROR] com.sun.faces.test.javaee7.cdibeanvalidator.Issue3014IT.testValidatorInjection  Time elapsed: 1.074 s  <<< FAILURE!
java.lang.AssertionError
        at com.sun.faces.test.javaee7.cdibeanvalidator.Issue3014IT.testValidatorInjection(Issue3014IT.java:70)

Stopping container using command: [/Library/Java/JavaVirtualMachines/jdk-11.0.13.jdk/Contents/Home/bin/java, -jar, /Users/starksm/Dev/JBoss/Jakarta/rh-faces/target/glassfish7/glassfish/modules/admin-cli.jar, stop-domain, -t]
[INFO]

@arjantijms
Copy link
Contributor Author

I have copied test over and made the group name consistent, but I see the first test that are run failing. I do see the same com.sun.faces.test.javaee7.cdibeanvalidator.Issue3014IT fail in the mojarra/test2 main brach as well:

That's "correct", as Hibernate Validator still hasn't released a Jakarta EE 10 compatible version, so Bean Validation doesn't work at all in GlassFish 7.

See https://hibernate.atlassian.net/browse/HV-1857 a little nudge to them would sure help I think ;)

@starksm64
Copy link
Contributor

starksm64 commented Jan 26, 2022

Ok, I have added the dependencies that need to be updated to the HV-1857 issue. You will need to push out the Index of org/glassfish:jakarta.el:5.0.0-M1 staging implementation of EL 5.0.0 as well.

starksm64 added a commit to jakartaredhat/faces that referenced this issue Jan 26, 2022
Signed-off-by: Scott M Stark <starksm64@gmail.com>
@starksm64
Copy link
Contributor

Now I see 2, to change the package names. I'll do that in the current #1601 PR. So is the change com.sun.faces.* -> ee.jakarta.tck.faces.*?

@arjantijms
Copy link
Contributor Author

Now I see 2, to change the package names. I'll do that in the current #1601 PR. So is the change com.sun.faces.* -> ee.jakarta.tck.faces.*?

Indeed, ee.jakarta.tck.faces seems to be the preferred package.

starksm64 added a commit to jakartaredhat/faces that referenced this issue Jan 26, 2022
Signed-off-by: Scott M Stark <starksm64@gmail.com>
@starksm64
Copy link
Contributor

Ok, item 2 is also in the #1601 PR

arjantijms added a commit that referenced this issue Jan 26, 2022
Copy the mojarra tck into the faces project, #1600 item 1
@alwin-joseph
Copy link
Contributor

alwin-joseph commented Jan 27, 2022

Incorporating the existing TCK from https://github.com/eclipse-ee4j/jakartaee-tck and disabling whatever doesn't work anymore (?)

Hi Arjan - I wanted to clarify on this part and the overall goals for faces TCK in JakartaEE 10.

Is it the expectation that a new Faces TCK should be built from this repo for JakartaEE10 release cycle? If so, are all tests(or the working ones) from jakartaee-tck repo(src/com/sun/ts/tests/jsf) need to be migrated to this repo as JUnit/Arquillian tests ?

In old-style tck tests(from jakartaee-tck) , currently most tests does not work due to compilation issues after the removal of deprecated methods in the api, I am working to fix them. I was looking to get help for converting jakarta.faces.bean.ManagedBean to CDI bean here.

@arjantijms
Copy link
Contributor Author

If so, are all tests(or the working ones) from jakartaee-tck repo(src/com/sun/ts/tests/jsf) need to be migrated to this repo as JUnit/Arquillian tests ?

This is probable way too much work for this cycle, as it concerns thousands of tests (I don't know how Jakarta REST/JAX-RS did this).

My idea was a little among the following:

  1. Fix in the old-style TCK what's possible to fix given the time and resource constraints.
  2. Exclude/move from the old-style TCK what can not be fixed in time
  3. From the new JUnit/Maven based TCK, include and run the old-style TCK as we've been doing for GlassFish here: https://github.com/eclipse-ee4j/glassfish/blob/master/appserver/tests/tck/faces/pom.xml

WDYT?

Please note that for the old-style TCK the existing *.jsp files won't work anymore either, and those would have to be converted to .xhtml, which means extra work on top of the already big task.

@alwin-joseph
Copy link
Contributor

alwin-joseph commented Jan 27, 2022

If so, are all tests(or the working ones) from jakartaee-tck repo(src/com/sun/ts/tests/jsf) need to be migrated to this repo as JUnit/Arquillian tests ?

This is probable way too much work for this cycle, as it concerns thousands of tests (I don't know how Jakarta REST/JAX-RS did this).

JAXRS has less than half the number of Faces tests. It required relatively fewer changes than what is required for faces now.

My idea was a little among the following:

1. Fix in the old-style TCK what's possible to fix given the time and resource constraints.

2. Exclude/move from the old-style TCK what can not be fixed in time

3. From the new JUnit/Maven based TCK, include and run the old-style TCK as we've been doing for GlassFish here: https://github.com/eclipse-ee4j/glassfish/blob/master/appserver/tests/tck/faces/pom.xml

WDYT?

IIUC this means we will use the new JUnit/Maven based TCK as the main TCK bundle within which we can invoke the old-style TCK tests. I think the old tests(source & classes) that are run also need to be part of the TCK bundle.
Is Glassfish (in the above appserver/tests/tck/faces/pom.xml) expecting the old TCK dependency to be obtained from maven repository ?

Please note that for the old-style TCK the existing *.jsp files won't work anymore either, and those would have to be converted to .xhtml, which means extra work on top of the already big task.

Agree.

@arjantijms
Copy link
Contributor Author

Is Glassfish (in the above appserver/tests/tck/faces/pom.xml) expecting the old TCK dependency to be obtained from maven repository ?

In that example, yes, but it's added locally to Maven via an other pom, which is this one:

https://github.com/eclipse-ee4j/glassfish/blob/master/appserver/tests/tck/tck-download/jakarta-faces-tck/pom.xml

If they eventually need to be packaged into a single bundle that should be doable.

@kito99
Copy link

kito99 commented Jan 31, 2022

Hey guys, what's the status of this? Looks like (1) and (2) are complete?

@arjantijms
Copy link
Contributor Author

@kito99 Yes, 1 and 2 have been done. I added a checkmark to them. Now it's a matter of starting to add assertion IDs, specifically to https://github.com/jakartaee/faces/tree/master/tck/faces40

@alwin-joseph
Copy link
Contributor

4. Incorporating the existing TCK from https://github.com/eclipse-ee4j/jakartaee-tck and disabling whatever doesn't work anymore (?)

This would require below sub tasks to be complete in jakartaee-tck.

a. Fix the build issues in the current source as reported in jakartaee/platform-tck#807. This is fixed and under review jakartaee/platform-tck#815 .
b. Convert jakarta.faces.bean.ManagedBean to CDI bean
c. Convert *.jsp files to .xhtml
d. Run the TCK using Glassfish 7 (atleast) & exclude/move the tests that cannot be fixed in time.
e. Package this old TCK built from jakartaee-tck into the new Faces TCK from this repo

@alwin-joseph
Copy link
Contributor

alwin-joseph commented Feb 2, 2022

  1. Copying the (not yet updated for 4.0) Faces TCK user guide from https://github.com/eclipse-ee4j/jakartaee-tck/tree/master/user_guides/jsf. The Platform TCK install guide could also be copied or merged with existing test2/README.md.

  2. Signature testing tooling is needed (e.g. TCK Migration: Move standalone jaxrs tck signature tests from jakartaee-tck eclipse-ee4j/jaxrs-api#1044).

CC @alwin-joseph @gurunrao

I will work on 5 & 6. Help would be appreciated to update the TCK Userguide contents for 4.0.0 after they are moved to this repo.

@kito99
Copy link

kito99 commented Feb 3, 2022

@arjantijms excuse my ignorance, but what is an assertion ID?

@arjantijms
Copy link
Contributor Author

@kito99

The assertions take some literal requirement from either the spec or the javadoc and assign an ID to it. This ID is then used in tests.

They are listed in a file, here the rendered HTML versions:

https://github.com/eclipse-ee4j/jakartaee-tck/tree/master/install/jsf/docs/assertions

There's often a source .xml too, but sometimes those are lost or duplicated. It's a bit messy at times, unfortunately. For source files see here: https://github.com/eclipse-ee4j/jakartaee-tck/tree/master/internal/docs/jsf (@alwin-joseph maybe those need some cleaning up?)

Here you see them used in the actual tests: https://github.com/eclipse-ee4j/jakartaee-tck/blob/master/src/com/sun/ts/tests/jsf/api/jakarta_faces/application/application/URLClient.java#L61

@arjantijms
Copy link
Contributor Author

(p.s. the assertion files are maybe a reflection of the "mapping file" thinking which was very popular in the late 90s and mid 00s. Maybe the current culture and thinking has more shifted towards tagging them at the location where they are defined, e.g. directly in the spec document and the javadoc)

@arjantijms
Copy link
Contributor Author

We could create a new folder as old-tck and have all the files(including the lib/jars) required to build and run the old style tck.

That sounds like a pretty good idea. I proposed the other approach mostly because I thought it would be easier/faster to do, but having the actual files here and not have that dependency would indeed be better.

@alwin-joseph
Copy link
Contributor

We could create a new folder as old-tck and have all the files(including the lib/jars) required to build and run the old style tck.

That sounds like a pretty good idea. I proposed the other approach mostly because I thought it would be easier/faster to do, but having the actual files here and not have that dependency would indeed be better.

Created PR #1649 for migrating the faces test sources from jakartaee-tck.

@arjantijms
Copy link
Contributor Author

@kito99 sorry to bother again, just wondering if you already have been able to find some time with helping to fix the outstanding TCK issues. We're done to 1001 failures, and every fix helps.

@arjantijms
Copy link
Contributor Author

@alwin-joseph I just merged #1649

@BalusC can you look to see if you can get the old TCK building / running?

@arjantijms
Copy link
Contributor Author

@tandraschko do you have time to try to run the TCK (old and new) against MyFaces?

@alwin-joseph
Copy link
Contributor

It would be great if we can generate the new TCK bundle via jenkins job(in faces Jenkins CI) and make it available at a download location so we can review the structure/contents and make amends if required.

@arjantijms
Copy link
Contributor Author

@alwin-joseph Indeed, that should be doable for sure.

@BalusC @tandraschko @kito99 @mnriem Did any of you succeeded in building the old TCK as transferred to this project? Not talking about fixing or running anything yet, just trying to build it. Nothing more. Hopefully just a single person has this 10 to 20 minutes to spare.

@arjantijms
Copy link
Contributor Author

It's quite unclear how to build the old TCK, but this one gives an example for expresion language:

jakartaee/platform-tck#933 (comment)

I'll copy it here:

export ANT_HOME=/opt/apache-ant-1.9.12
export M2_HOME=/opt/apache-maven-3.6.3
export GF_BUNDLE_URL=https://download.eclipse.org/ee4j/glassfish/glassfish-7.0.0-SNAPSHOT-nightly.zip
export JDK11_HOME=/opt/java/temurin-jdk-11-latest

docker/build_standalone-tcks.sh el

Example of installing the TCK after building it:

https://github.com/eclipse-ee4j/glassfish/blob/master/appserver/tests/tck/tck-download/jakarta-faces-tck/pom.xml#L69

Example of running the TCK:

https://github.com/eclipse-ee4j/glassfish/blob/master/appserver/tests/tck/pages/pom.xml

cc @dmatej

@alwin-joseph
Copy link
Contributor

It's quite unclear how to build the old TCK, but this one gives an example for expresion language:

eclipse-ee4j/jakartaee-tck#933 (comment)

I'll copy it here:

export ANT_HOME=/opt/apache-ant-1.9.12
export M2_HOME=/opt/apache-maven-3.6.3
export GF_BUNDLE_URL=https://download.eclipse.org/ee4j/glassfish/glassfish-7.0.0-SNAPSHOT-nightly.zip
export JDK11_HOME=/opt/java/temurin-jdk-11-latest

docker/build_standalone-tcks.sh el

Example of installing the TCK after building it:

https://github.com/eclipse-ee4j/glassfish/blob/master/appserver/tests/tck/tck-download/jakarta-faces-tck/pom.xml#L69

Example of running the TCK:

https://github.com/eclipse-ee4j/glassfish/blob/master/appserver/tests/tck/pages/pom.xml

cc @dmatej

mvn clean package using tck/pom.xml should build the old tck & new tests and create the final bundle at tck/target. The old tck build script is integrated to the tck pom at https://github.com/jakartaee/faces/blob/master/tck/pom.xml#L378.

mvn clean verify using tck/faces-tck/pom.xml will build and run the tests in old tck alone.

@arjantijms
Copy link
Contributor Author

mvn clean verify using tck/faces-tck/pom.xml will build and run the tests in old tck alone.

Sounds great Alwin, thanks!

Now maybe the only thing needed there is the ability to deploy and run a single test. I added that for Pages here:

https://github.com/eclipse-ee4j/glassfish/blob/master/appserver/tests/tck/pages/pom.xml#L261

and here:

https://github.com/eclipse-ee4j/glassfish/blob/master/appserver/tests/tck/pages/pom.xml#L295

@BalusC with that new info from Alwin, can you continue on?

@scottmarlow
Copy link

Will https://ci.eclipse.org/faces be used to build the new Faces TCK? Have any implementations started to create any public CI jobs for running the Faces TCK?

@arjantijms
Copy link
Contributor Author

@scottmarlow not yet, I'm mostly waiting for some more of the old tests to be fixed. But I understand working with the (old) TCK is not so easy for everyone, even if those people could help with the Faces work itself.

@volosied
Copy link
Contributor

volosied commented Apr 20, 2022

Hi, I'd like to help out with Faces and the TCK here. I'm trying to follow this conversation here. Are we trying to fix the old tck and then move these tests over to the new Faces TCK?

Can anyone give me any tasks? (@arjantijms) Thanks!

Update:
I'm trying to find the current failures via

git clone https://github.com/jakartaee/faces.git
cd faces/tck/faces-tck ; mvn clean verify 

@arjantijms
Copy link
Contributor Author

Hi, I'd like to help out with Faces and the TCK here.

Thanks a bunch, much appreciated!

Can anyone give me any tasks? (@arjantijms) Thanks!

The first task is to simply build and run the old TCK. Almost nobody (AFAIK) has been able to do that. It's perhaps a trivial task, but someone needs to do it.

There were 1001 failures when last time executed when still in the platform TCK, though typically it aren't 1001 unique failures. So the next obvious task would be to start reducing those failures.

A second (simultaneous) task would be to make it possible to run a single test, like e.g. can be done here: https://github.com/eclipse-ee4j/glassfish/blob/master/appserver/tests/tck/pages/pom.xml

@alwin-joseph
Copy link
Contributor

alwin-joseph commented Apr 21, 2022

@arjantijms
I have created a CI job that builds the faces tck at https://ci.eclipse.org/jakartaee-tck/job/10/job/jakarta-faces-tck-build
It requires PR #1651 that includes some improvements for the tck build process.

TCK bundle is available at https://download.eclipse.org/ee4j/jakartaee-tck/jakartaee10/staged/eftl/jakarta-faces-tck-4.0.0-SNAPSHOT.zip

@volosied
Copy link
Contributor

PR #1653 should address 1, 3, and 5 in #1600 (comment)

@alwin-joseph
Copy link
Contributor

alwin-joseph commented Apr 22, 2022

Below are the mvn targets that can be used for new tck build/run/generation.
Can someone help validate and help improve these.

1. To build and run the new tck :

cd tck/
mvn clean verify 

This will first start building the old tck hence takes longer time to start running the new tests.

2. To build and run the old tck alone :

cd tck/faces-tck
mvn clean verify 

3. To generate the new TCK bundle :

cd tck/
mvn clean package 

The job https://ci.eclipse.org/jakartaee-tck/job/10/job/jakarta-faces-tck-build/ does the same, copies the bundle at https://download.eclipse.org/ee4j/jakartaee-tck/jakartaee10/staged/eftl/jakarta-faces-tck-4.0.0-SNAPSHOT.zip.

4. TCK run using the bundle:

unzip jakarta-faces-tck-4.0.0-SNAPSHOT.zip
cd jakarta-faces-tck-4.0.0-SNAPSHOT
cd faces-tck
mvn clean verify
  • b. Run new tests/all tests :
cd jakarta-faces-tck-4.0.0-SNAPSHOT
mvn clean verify

Currently this is broken due to 2 reasons :

  • The tck/pom.xml has parent pom details.
  • The tck/pom.xml has build-old-tck, build-userguide and packaging phase using maven-assembly-plugin for tck build. These 3 executions should not be executed or disabled in the tck bundle pom.xml.
    Is there a better solution than to have multiple pom files for repository and bundle build/run?

@alwin-joseph
Copy link
Contributor

@volosied @arjantijms The latest test result of old tck run from repository :

     [exec] [javatest.batch] Completed running 5425 tests.
     [exec] [javatest.batch] Number of Tests Passed      = 5395
     [exec] [javatest.batch] Number of Tests Failed      = 30
     [exec] [javatest.batch] Number of Tests with Errors = 0

https://ci.eclipse.org/jakartaee-tck/job/10/job/jakarta-faces-tck-build-run/14/consoleText

@volosied
Copy link
Contributor

volosied commented Apr 28, 2022

Remaining failures:

     [exec] [javatest.batch] FAILED........com/sun/ts/tests/jsf/api/jakarta_faces/application/resource/URLClient.java#resourceGetRequestPathLibTest
     [exec] [javatest.batch] FAILED........com/sun/ts/tests/jsf/api/jakarta_faces/application/resource/URLClient.java#resourceGetRequestPathTest
     [exec] [javatest.batch] FAILED........com/sun/ts/tests/jsf/api/jakarta_faces/application/resource/URLClient.java#resourceToStringTest
     [exec] [javatest.batch] FAILED........com/sun/ts/tests/jsf/api/jakarta_faces/application/resourcewrapper/URLClient.java#resourceWrapperGetRequestPathLibTest
     [exec] [javatest.batch] FAILED........com/sun/ts/tests/jsf/api/jakarta_faces/application/resourcewrapper/URLClient.java#resourceWrapperGetRequestPathTest
     [exec] [javatest.batch] FAILED........com/sun/ts/tests/jsf/spec/ajax/jsresource/URLClient.java#ajaxPDLResourceTest
     [exec] [javatest.batch] FAILED........com/sun/ts/tests/jsf/spec/composite/actionsource/URLClient.java#compositeActionSourceTagTest
     [exec] [javatest.batch] FAILED........com/sun/ts/tests/jsf/spec/composite/attribute/URLClient.java#compositeAttributeTagTest
     [exec] [javatest.batch] FAILED........com/sun/ts/tests/jsf/spec/composite/editablevalueholder/URLClient.java#compositeEditableValueHolderTest
     [exec] [javatest.batch] FAILED........com/sun/ts/tests/jsf/spec/composite/facet/URLClient.java#compositeFacetsTagTest
     [exec] [javatest.batch] FAILED........com/sun/ts/tests/jsf/spec/composite/packaging/classpath/URLClient.java#compositeClasspathPKGTest
     [exec] [javatest.batch] FAILED........com/sun/ts/tests/jsf/spec/composite/packaging/webapproot/URLClient.java#compositeWebAppRootPKGTest
     [exec] [javatest.batch] FAILED........com/sun/ts/tests/jsf/spec/composite/valueholder/URLClient.java#compositeValueHolderTest
     [exec] [javatest.batch] FAILED........com/sun/ts/tests/jsf/spec/el/elresolvers/URLClient.java#facesImplicitObjectResolverFeatureDescriptorTest
     [exec] [javatest.batch] FAILED........com/sun/ts/tests/jsf/spec/el/elresolvers/URLClient.java#facesImplicitObjectResolverGetTypeTest
     [exec] [javatest.batch] FAILED........com/sun/ts/tests/jsf/spec/el/elresolvers/URLClient.java#facesImplicitObjectResolverIsReadOnlyTest
     [exec] [javatest.batch] FAILED........com/sun/ts/tests/jsf/spec/el/elresolvers/URLClient.java#facesImplicitObjectResolverSetValueTest
     [exec] [javatest.batch] FAILED........com/sun/ts/tests/jsf/spec/el/elresolvers/URLClient.java#facesManagedBeanResolverGetValueTest
     [exec] [javatest.batch] FAILED........com/sun/ts/tests/jsf/spec/el/elresolvers/URLClient.java#facesResourceBundleResolverFeatureDescriptorTest
     [exec] [javatest.batch] FAILED........com/sun/ts/tests/jsf/spec/el/elresolvers/URLClient.java#facesScopedAttributeResolverFeatureDescriptorTest
     [exec] [javatest.batch] FAILED........com/sun/ts/tests/jsf/spec/el/elresolvers/URLClient.java#managedBeanELResolverFeatureDescriptorTest
     [exec] [javatest.batch] FAILED........com/sun/ts/tests/jsf/spec/flows/basicmethodcall/URLClient.java#facesFlowBasicMethodCallTest
     [exec] [javatest.batch] FAILED........com/sun/ts/tests/jsf/spec/flows/basicmultipage/URLClient.java#facesFlowScopeTest
     [exec] [javatest.batch] FAILED........com/sun/ts/tests/jsf/spec/flows/multipagewebinf/URLClient.java#facesFlowWebInfScopeTest
     [exec] [javatest.batch] FAILED........com/sun/ts/tests/jsf/spec/render/commandbutton/URLClient.java#cbuttonRenderPassthroughTest
     [exec] [javatest.batch] FAILED........com/sun/ts/tests/jsf/spec/render/messages/URLClient.java#messagesRenderEncodeTest
     [exec] [javatest.batch] FAILED........com/sun/ts/tests/jsf/spec/render/onelistbox/URLClient.java#oneListboxRenderDecodeTest
     [exec] [javatest.batch] FAILED........com/sun/ts/tests/jsf/spec/render/outputlink/URLClient.java#outputLinkRenderPassthroughTest
     [exec] [javatest.batch] FAILED........com/sun/ts/tests/jsf/spec/resource/packaging/classpath/URLClient.java#jsfJsDoesExistTest
     [exec] [javatest.batch] FAILED........com/sun/ts/tests/jsf/spec/webapp/tldsig/URLClient.java#jsfTldSignatureTest

I will look at updating the application/resource & application/resourcewrapper test next via #1663. Tests will need to be updated to expect the correct URLs.

I think the elresolvers tests should also be looked at next.

@arjantijms
Copy link
Contributor Author

@volosied @BalusC @tandraschko @alwin-joseph

As our time is essentially up, and Faces needs to go in ballot tomorrow, I think we'd best start to pack-up what we have now, excluding the small list of tests above. Perhaps we can do a maintenance update including the final tests shortly after EE 10?

@alwin-joseph
Copy link
Contributor

As our time is essentially up, and Faces needs to go in ballot tomorrow, I think we'd best start to pack-up what we have now, excluding the small list of tests above. Perhaps we can do a maintenance update including the final tests shortly after EE 10?

Created #1666 to exclude the remaining 25 tests that fails.

IMO the TCK userguide need to be reviewed/updated and final TCK packaging and structure need to be revisited as I had faced below issue earlier.

* The tck/pom.xml has build-old-tck, build-userguide and packaging phase using maven-assembly-plugin for tck build. These 3 executions should not be executed or disabled in the tck bundle pom.xml.

Will the TCK build and run jobs be created in faces Jenkins?

@arjantijms
Copy link
Contributor Author

Will the TCK build and run jobs be created in faces Jenkins?

Yes, I've done this for Security al ready, and the plan is to do the same for Faces and Authentication.

For Security, see this job:

https://ci.eclipse.org/es/job/2_security-run-tck-against-staged-build/

#!/usr/bin/env groovy

node {
   
    def API_JAR_NAME = "jakarta.security.enterprise-api.jar"
    def DOWNLOAD_API_JAR_NAME = "jakarta.security.enterprise-api-2.0.0.jar"
    def API_URL = "https://jakarta.oss.sonatype.org/content/repositories/staging/jakarta/security/enterprise/jakarta.security.enterprise-api/2.0.0/${DOWNLOAD_API_JAR_NAME}"
    
    def IMPL_JAR_NAME = "jakarta.security.enterprise.jar"
    def DOWNLOAD_IMPL_JAR_NAME = "jakarta.security.enterprise-2.0.1.jar"
    def IMPL_URL = "https://jakarta.oss.sonatype.org/content/repositories/staging/org/glassfish/soteria/jakarta.security.enterprise/2.0.1/${DOWNLOAD_IMPL_JAR_NAME}"
    
    def IMPL_JAR_NAME2 = "soteria.spi.bean.decorator.weld.jar"
    def DOWNLOAD_IMPL_JAR_NAME2 = "soteria.spi.bean.decorator.weld-2.0.1.jar"
    def IMPL_URL2 = "https://jakarta.oss.sonatype.org/content/repositories/staging/org/glassfish/soteria/soteria.spi.bean.decorator.weld/2.0.1/${DOWNLOAD_IMPL_JAR_NAME2}"
    
    def GF_URL = "https://ci.eclipse.org/glassfish/view/GlassFish/job/glassfish_build-and-test-using-jenkinsfile/job/master/lastSuccessfulBuild/artifact/bundles/glassfish.zip"
    
    def TCK_BUNDLE_NAME = "jakarta-security-tck-3.0.0"
    def TCK_BUNDLE_URL = "https://download.eclipse.org/es/jakartaee10/staged/eftl/${TCK_BUNDLE_NAME}.zip"
    
    env.ANT_VERSION='1.9.15'
    env.TOOLS_PREFIX='/opt/tools'
    env.JAVA_PREFIX="${TOOLS_PREFIX}/java/openjdk"
    env.MVN_HOME="${TOOLS_PREFIX}/apache-maven/latest"
    env.JAVA_HOME="${JAVA_PREFIX}/jdk-17/latest"
    env.PATH="${MVN_HOME}/bin:${JAVA_HOME}/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
   
    env.ANT_OPTS="-Djavax.xml.accessExternalSchema=all"
    env.JAVA_TOOL_OPTIONS ='-XX:+IgnoreUnrecognizedVMOptions -XX:+UnlockExperimentalVMOptions '
    
    stage("Init") {
        // https://go.cloudbees.com/docs/cloudbees-documentation/cjoc-user-guide/index.html#cluster-copy-artifacts
        dir ("download") {
            // If any artefacts from other jobs need to be used, they can be placed here
            // copyRemoteArtifacts(from: "${GF_BUILD_JOB}")
            // copyRemoteArtifacts(from: "${TS_JTE_BUILD_JOB}")
        }
        sh '''#!/bin/bash -x
        
            mkdir download
            
           '''
    }
    
    stage("Grab GF") {
    	env.GF_URL = "${GF_URL}"
        sh '''#!/bin/bash -ex
        
           # Add support for downloading GF from an arbitrary location
            
           '''
    }
    
    stage("Grab API and IMPL") {
    	env.API_URL = "${API_URL}"
    	env.API_JAR_NAME = "${API_JAR_NAME}"
    	env.IMPL_URL = "${IMPL_URL}"
    	env.IMPL_JAR_NAME = "${IMPL_JAR_NAME}"
    	env.IMPL_URL2 = "${IMPL_URL2}"
    	env.IMPL_JAR_NAME2 = "${IMPL_JAR_NAME2}"
        sh '''#!/bin/bash -ex
        
           
            
           '''
    }
    
    stage("Grab TCK") {
        env.TCK_BUNDLE_URL = "${TCK_BUNDLE_URL}"
        env.TCK_BUNDLE_NAME = "${TCK_BUNDLE_NAME}"
        sh '''#!/bin/bash -ex
            cd ${WORKSPACE}/download 
            wget -q ${TCK_BUNDLE_URL} -O ${TCK_BUNDLE_NAME}.zip
            
            cd ${WORKSPACE}
            unzip ${WORKSPACE}/download/${TCK_BUNDLE_NAME}.zip
            
            cat ${TCK_BUNDLE_NAME}/pom.xml
           '''
    }
   
    stage ("Configure ts.jte") {
       
        sh '''#!/bin/bash -ex
           
           
           '''
    }
  
     stage("Configure TCK") {
        sh '''#!/bin/bash -ex
           
          
            
           '''
    }
   
    stage ("Run TCK tests") {
        env.TCK_BUNDLE_NAME = "${TCK_BUNDLE_NAME}"
        sh '''#!/bin/bash -x
         
        ls -altrh
        echo ${TCK_BUNDLE_NAME}
        cd ${TCK_BUNDLE_NAME}
        
        
         
        mvn clean install -Pstaging,glassfish-ci-managed -Dglassfish.version=7.0.0-M4 surefire-report:failsafe-report-only -Daggregate=true | tee ${WORKSPACE}/run.log
        
           '''       
    } 
    
    stage ("Create summary.txt, API, and run.log artifacts") {
        env.TCK_BUNDLE_NAME = "${TCK_BUNDLE_NAME}"
        sh '''#!/bin/bash -ex
            cd ${WORKSPACE}/${TCK_BUNDLE_NAME}
            
            
            # Should not be needed, but some reason is.
            mvn site -Pstaging -pl -:glassfish-external-tck-security surefire-report:failsafe-report-only -Daggregate=true -DskipITs=true -DskipSurefireReport=true -Dglassfish.version=7.0.0-M4 -T2
            
            cd ${WORKSPACE}
            ls -altrh
            
            ls ${TCK_BUNDLE_NAME}
            ls ${WORKSPACE}/${TCK_BUNDLE_NAME}
            ls ${WORKSPACE}/${TCK_BUNDLE_NAME}/target
            
            
            cat ${TCK_BUNDLE_NAME}/target/site/failsafe-report.html | sed '/table/,/table/!d;//d' | sed '/Package/q' | sed -n 's:.*<td.*>\\(.*\\)</td>.*:\\1:p' > tmp_result.txt
            
            PASSED_COUNT=`cat tmp_result.txt |  sed '1q;d'`
            ERROR_COUNT=`cat tmp_result.txt |  sed '2q;d'`
            FAILED_COUNT=`cat tmp_result.txt |  sed '3q;d'`
            
            
            
            echo "********************************************************************************"  >> summary.txt
            echo "Completed running ${PASSED_COUNT} tests."                                          >> summary.txt
            echo "Number of Tests Failed      = ${FAILED_COUNT}"                                     >> summary.txt
            echo "Number of Tests with Errors = ${ERROR_COUNT}"                                      >> summary.txt
            echo "********************************************************************************"  >> summary.txt
            
            cat run.log | sed -e '1,/Completed running/d' >> summary.txt
            
            SHA256_API=`sha256sum ${WORKSPACE}/${TCK_BUNDLE_NAME}/target/glassfish7/glassfish/modules/${API_JAR_NAME} | awk '{print $1}'`
            SHA256_IMPL=`sha256sum ${WORKSPACE}/${TCK_BUNDLE_NAME}/target/glassfish7/glassfish/modules/${IMPL_JAR_NAME} | awk '{print $1}'`
            SHA256_TCK=`sha256sum ${WORKSPACE}/download/${TCK_BUNDLE_NAME}.zip | awk '{print $1}'`
            
            echo ERROR_COUNT=${ERROR_COUNT}
            echo FAILED_COUNT=${FAILED_COUNT}
            echo PASSED_COUNT=${PASSED_COUNT}
            
            echo ----
            
            echo SHA256_API=${SHA256_API} | tee -a summary.txt
            echo SHA256_IMPL=${SHA256_IMPL} | tee -a summary.txt
            echo SHA256_TCK=${SHA256_TCK}  | tee -a summary.txt
         
            echo ----
         
            echo TCK_download=${TCK_BUNDLE_URL} | tee -a summary.txt
            
            echo ----
            
            OS1=`lsb_release -a || true`
            OS2=`cat /etc/issue.net || true`
            OS3=`cat /etc/*_version || true`
            OS4=`cat /etc/*-release || true`
            
            if [ ! -z "${OS1}" ]; then
                echo OS1=${OS1} | tee -a summary.txt
            fi
            if [ ! -z "${OS2}" ]; then
                echo OS2=${OS2} | tee -a summary.txt
            fi
            if [ ! -z "${OS3}" ]; then
                echo OS3=${OS3} | tee -a summary.txt
            fi
            if [ ! -z "${OS4}" ]; then
                echo OS4=${OS4} | tee -a summary.txt
            fi
           
            JDK_VERSION=$(java -version 2>&1 || true)
            
            echo JDK_VERSION=${JDK_VERSION} | tee -a summary.txt
            
           '''

        archiveArtifacts artifacts: "summary.txt", fingerprint: true
        archiveArtifacts artifacts: "run.log", fingerprint: true
    }
}

Maybe we can do a minor maintenance release of the TCKs after EE 10. E.g. a 4.0.1 for security to clean up everything a little.

@scottmarlow
Copy link

Should these tasks be carried into a Faces 4.1 TCK task list and this issue closed?

@arjantijms
Copy link
Contributor Author

Should these tasks be carried into a Faces 4.1 TCK task list and this issue closed?

At a glance I don't think anything needs to be carried over. These are all very specific items from the old to new TCK migration. I'll just close the issue now then.

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

No branches or pull requests

8 participants