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

rename TCK package from package jakarta.jsonp.tck to jsonp.tck #351

Closed
wants to merge 2 commits into from

Conversation

scottmarlow
Copy link
Contributor

Signed-off-by: Scott Marlow [email protected]

Copyright dates need to be updated and locally, I always see a test failure (with and without changes):

[INFO] Results:
[INFO] 
[ERROR] Errors: 
[ERROR]   ClientTests.jsonParserCurrentEvent:1862 NoSuchMethod 'jakarta.json.stream.Json...
[ERROR]   ClientTests.testDuplicateKeysFirst:3214 NoClassDefFound jakarta/json/JsonConfi...
[ERROR]   ClientTests.testDuplicateKeysLast:3233 NoClassDefFound jakarta/json/JsonConfig...
[ERROR]   ClientTests.testDuplicateKeysNone:3194 NoClassDefFound jakarta/json/JsonConfig...
[ERROR]   ClientTests.jsonNumber21Test:347 NoSuchMethod 'jakarta.json.JsonNumber jakarta...
[INFO] 
[ERROR] Tests run: 177, Failures: 0, Errors: 5, Skipped: 0

@lukasj
Copy link
Contributor

lukasj commented Jan 12, 2022

rebasing on master should help

@lukasj
Copy link
Contributor

lukasj commented Jan 12, 2022

wrt copyright updates, I run (on mac):

$ git add
$ for f in $(git diff --cached --name-only); do sed -E -i '' -e "s/([[:digit:]][[:digit:]][[:digit:]][[:digit:]]), ([[:digit:]][[:digit:]][[:digit:]][[:digit:]])/\1, 2022/" $f; done

eventually also an alternative for files created in 2021

@scottmarlow
Copy link
Contributor Author

rebasing on master should help

Thanks, ^ addressed most of the failures, I'm seeing the below failure now with my changes:

[ERROR] jsonp.tck.pluggability.jsonprovidertests.ClientTests.jsonProviderTest1  Time elapsed: 0.045 s  <<< FAILURE!
org.opentest4j.AssertionFailedError: jsonProviderTest1 Failed ==> expected: <true> but was: <false>
        at org.junit.jupiter.api.AssertionUtils.fail(AssertionUtils.java:55)
        at org.junit.jupiter.api.AssertTrue.assertTrue(AssertTrue.java:40)
        at org.junit.jupiter.api.Assertions.assertTrue(Assertions.java:193)
        at jsonp.tck.pluggability.jsonprovidertests.ClientTests.jsonProviderTest1(ClientTests.java:105)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
.
.
.
[INFO] 
[INFO] Results:
[INFO] 
[ERROR] Failures: 
[ERROR]   ClientTests.jsonProviderTest1:105 jsonProviderTest1 Failed ==> expected: <true> but was: <false>
[INFO] 
[ERROR] Tests run: 18, Failures: 1, Errors: 0, Skipped: 0

I don't get the ^ failure if I switch to the master branch, build the TCK and test again.

From impl-tck/tck-tests-pluggability/target/surefire-reports/TEST-jsonp.tck.pluggability.jsonprovidertests.ClientTests.xmloutput logged after the test:

Jan 12, 2022 10:27:44 AM jsonp.tck.pluggability.jsonprovidertests.ClientTests jsonProviderTest1
INFO: provider class=jsonp.tck.provider.MyJsonProvider
Jan 12, 2022 10:27:44 AM jsonp.tck.pluggability.jsonprovidertests.ClientTests jsonProviderTest1
WARNING: Current provider is not my provider - unexpected.
Jan 12, 2022 10:27:44 AM jsonp.tck.pluggability.jsonprovidertests.ClientTests jsonProviderTest1
INFO: Providers: [jsonp.tck.provider.MyJsonProvider@7180e701, org.eclipse.parsson.JsonProviderImpl@4e2c95ee]

@scottmarlow
Copy link
Contributor Author

scottmarlow commented Jan 12, 2022

I updated the information logged to show:

LOGGER.warning("Current provider is not my provider - unexpected.  providerClass=" + providerClass + " , MY_JSONPROVIDER_CLASS=" +MY_JSONPROVIDER_CLASS);

^ shows:

WARNING: Current provider is not my provider - unexpected.  providerClass=jsonp.tck.provider.MyJsonProvider , MY_JSONPROVIDER_CLASS=MyJsonProvider```

@scottmarlow
Copy link
Contributor Author

I now see the problem and will fix it, I had changed:

private static final String MY_JSONPROVIDER_CLASS = "jakarta.jsonp.tck.provider.MyJsonProvider";

To:

private static final String MY_JSONPROVIDER_CLASS = "MyJsonProvider";

Which caused the failure.

…ackage from package jakarta.jsonp.tck to jsonp.tck

Signed-off-by: Scott Marlow <[email protected]>
@scottmarlow
Copy link
Contributor Author

wrt copyright updates, I run (on mac):

$ git add
$ for f in $(git diff --cached --name-only); do sed -E -i '' -e "s/([[:digit:]][[:digit:]][[:digit:]][[:digit:]]), ([[:digit:]][[:digit:]][[:digit:]][[:digit:]])/\1, 2022/" $f; done

eventually also an alternative for files created in 2021

Thanks, I made a note of ^

I used https://github.com/eclipse-ee4j/glassfish-copyright-plugin (clone it and build it locally):

export COMMITID=83c67278c583e5645cfe77f936396277b00ccc6c
repo=~/.m2/repository/org/glassfish/copyright/glassfish-copyright-maven-plugin
v=`ls $repo | grep '^[1-9]' | tail -1`
for i in `git diff-tree --no-commit-id --name-only -r $COMMITID`; do echo java -cp $repo/$v/glassfish-copyright-maven-plugin-$v.jar org.glassfish.copyright.Copyright -r -c $i >> /tmp/script.sh; done
chmod +x /tmp/script.sh
. /tmp/script.sh

I also did:

export COMMITID=83c67278c583e5645cfe77f936396277b00ccc6c
repo=~/.m2/repository/org/glassfish/copyright/glassfish-copyright-maven-plugin
v=`ls $repo | grep '^[1-9]' | tail -1`
for i in `git diff-tree --diff-filter=RA --no-commit-id --name-only -r $COMMITID`; do echo java -cp $repo/$v/glassfish-copyright-maven-plugin-$v.jar org.glassfish.copyright.Copyright -r -c $i >> /tmp/script.sh; done
chmod +x /tmp/script.sh
. /tmp/script.sh

After doing the above two steps, I reviewed what was updated and reverted a few unneeded changes where a copyright was added to a file that didn't have one before (e.g. signature map file).

@scottmarlow
Copy link
Contributor Author

I'm trying to run on master branch with latest changes locally and seeing failure:

Failures: 
[ERROR]   JsonProviderTest.systemProperty:57 expected: <jakarta.jsonp.tck.api.provider.JsonProviderTest.DummyJsonProvider> but was: <org.eclipse.parsson.JsonProviderImpl>

@scottmarlow
Copy link
Contributor Author

I'm going to create a new pr that uses the ee.jakarta.tck package since that was used for https://github.com/eclipse-ee4j/jsonb-api

@lukasj
Copy link
Contributor

lukasj commented Feb 9, 2022

what exactly are you trying to run? just rebase, build the tck, unzip the binary and run bin/pom.xml - the force will guide you (or user guide? who knows ;-) ); ignore the impl-tck folder

@scottmarlow
Copy link
Contributor Author

Replaced by #355

@scottmarlow scottmarlow closed this Feb 9, 2022
@scottmarlow
Copy link
Contributor Author

what exactly are you trying to run? just rebase, build the tck, unzip the binary and run bin/pom.xml - the force will guide you (or user guide? who knows ;-) ); ignore the impl-tck folder

I had done something like:

cd api;mvn clean install;cd ../tck;mvn clean install;cd ../impl-tck;mvn clean install

Thanks, I will ignore the impl-tck folder

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