Skip to content

Integrate TCK test execution in jsonb/core modules #125

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

Merged
merged 7 commits into from
May 3, 2024

Conversation

jungm
Copy link
Member

@jungm jungm commented Mar 26, 2024

IMO TCK tests should be considered part of our normal test suite and not be hidden behind a profile, IIRC they were only moved to a seperate profile to not break the build when the EE10 TCK branch got merged

@rmannibucau
Copy link
Contributor

Do we want to make it lazy and enable tck module or make it right and run it as part of the modules they test instead (and drop tck module) now?

@jungm
Copy link
Member Author

jungm commented Mar 26, 2024

+1 for dropping TCK modules and integrating it right into the implementing modules

IIRC at least the json-p pluggability tests were quite flimsy to set up, I'll try to make it work

@jungm
Copy link
Member Author

jungm commented Mar 26, 2024

I believe we actually have no need to run pluggability tests. They test the JSON-P SPI which isn't even part of johnzon: https://github.com/jakartaee/jsonp-api/blob/2.1.1-tck/tck/tck-tests-pluggability/src/main/java/ee/jakarta/tck/jsonp/pluggability/jsonprovidertests/ClientTests.java

@rmannibucau
Copy link
Contributor

@jungm depends, if you want to be certified you need to since the certification is for the impl+used api to pass it (see it as "standalone" bundle). No strong opinion on it.

@jungm
Copy link
Member Author

jungm commented Mar 26, 2024

I guess if we ever want to be certified we would need to use the test harness provided with the TCK anyways (https://github.com/jakartaee/jsonp-api/tree/master/tck/tck-dist-eftl, https://github.com/jakartaee/jsonb-api/tree/master/tck-dist), though not sure to be fair

Anyways, I see no real advantage of running pluggability tests if we don't have a jsonp-api module

@rmannibucau
Copy link
Contributor

Hmm I'm not sure of this part.

Anyways, I see no real advantage of running pluggability tests if we don't have a jsonp-api module

We decided to inherit from the official one so we do have it, the point of these tests is to ensure you don't break the API impl on that part - this is more obvious for containers which could hardcode the SPI or prevent the pluggability - it is often togglable like in TomEE.
But long story short we should run it even if we fake the env for these tests to show our impl does not prevent it and does not break it, nothing more IMHO.

@jungm
Copy link
Member Author

jungm commented Mar 28, 2024

Spent some time on this now, running pluggability tests within johnzon-core is doable but the solution I came up with feels like a terrible hack IMO

There's also still a weird issue with the javadoc plugin still happening right now (mvn clean install -Dmaven.javadoc.skip works fine already)

@rmannibucau
Copy link
Contributor

Javadoc should run anyway so not a big deal pby.
Not sure about the hack, is it using vintage engine?

@jungm
Copy link
Member Author

jungm commented Mar 28, 2024

Yeah running vintage engine could probably clean up things a bit more, didn't think of this and went straight to configuring providers when I saw surefire automatically switching to jupiter provider once I dropped in the tck dependencies

The actual hack I meant though is this:

<classesDirectory>${project.build.outputDirectory}/nowhere</classesDirectory>

@rmannibucau
Copy link
Contributor

This hack is ok for me

@jungm
Copy link
Member Author

jungm commented Mar 30, 2024

Build works now, it was failing due to sigtest-maven-plugin having a dependency on the local file ${java.home}/lib/ct.sym, see jtulach/netbeans-apitest#3
Having this dependency breaks javadoc plugin though, I excluded the dependency for now and it does not break tests. Probably worth investigating more and raising issues where appropriate

Johnzon tests also run on junit 5 now (through vintage engine for now)

@jungm jungm requested a review from rmannibucau March 30, 2024 18:16
@jungm jungm changed the title Run TCK tests by default Integrate TCK test execution in jsonb/core modules Mar 30, 2024
@jungm jungm merged commit d5665b9 into apache:master May 3, 2024
3 checks passed
@jungm jungm deleted the tck-by-default branch June 3, 2024 14:20
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.

2 participants