-
Notifications
You must be signed in to change notification settings - Fork 61
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
#376: JsonProviderTest fails if run after other Junits in a test suite #380
Conversation
Signed-off-by: Lukas Jungmann <lukas.jungmann@oracle.com>
This on its own doesn't fix the problem because the JsonProvider code checks to see if the class has been instantiated before it tries to get the system property. If the class has already been instantiated, it doesn't even look at the system property again so resetting it has no effect. |
Signed-off-by: Lukas Jungmann <lukas.jungmann@oracle.com>
Now I know which static variable you were referring to. Try again, please. |
Signed-off-by: Lukas Jungmann <lukas.jungmann@oracle.com>
Signed-off-by: Lukas Jungmann <lukas.jungmann@oracle.com>
So looks like your latest change, changes the behavior of the JsonProvider class slightly in that previously the System property would only be read once in the static code block and with your change it would be read every time a provider instance is requested. The spec doesn't say specifically if this new usage scenario should be supported: https://jakarta.ee/specifications/jsonp/2.1/apidocs/jakarta.json/jakarta/json/spi/jsonprovider#provider() The behavior change is subtle, but wondering if changing the behavior to get the test to pass is the correct resolution as opposed to removing the test from the TCK? |
Neither it says the opposite. All it says is if the property is set, it is used (+ 2 more steps) and that it is a responsibility of the user to cache the actual provider The motivation for the original code was to not allow one deployment to influence the other one - imagine there are two apps on the server using the API, one decides to call setProperty for some reason and the other one does not expect it
simple addition of Each test must be run in its own JVM. requirement to the TCK User guide also solves the problem, doesn't it? |
Agreed that addition of Each test must be run in its own JVM. requirement to the TCK User guide also solves the problem |
fixes #376
fixes #377
fixes #378
@KyleAure/@tabishop , @starksm64 - can you check this fixes issues you are seeing, please?