-
Notifications
You must be signed in to change notification settings - Fork 63
Description
ee.jakarta.tck.jsonp.api.provider.JsonProviderTest.java will fail if run in a Junit test suite if it executes after any other TCK test that calls JsonProvider.provider(). Junits don't guarantee order of execution of tests within a test suite by default.
This is because the JsonProvider loads the provider as a static final the first time it is requested. The JsonProviderTest.java class attempts to set a system property to a dummy provider class, call JsonProvider.provider(), and then tries to validate that the provider returned is the dummy provider class. However, if any other TCK test that calls JsonProvider.provider() is run before this test, it will fail because the returned provider will be of the class initially used, not the dummy provider.
To recreate, create a Junit Test suite with the JsonProviderTest and any other test that calls JsonProvider.provider() and runs before Json ProviderTest.
This causes problems when trying to develop test automation for Open Liberty support of JSONP 2.1