jdk8u-dev
jdk8u-dev copied to clipboard
8265019: Update tests for additional TestNG test permissions
Backport fixes 2 tests failures, when newer jtreg is used (6+1). Affects only test code. It excludes changes to test/jdk/java/lang/ProcessHandle/PermissionTest.java as jdk8 does not have this file (ProcessHandle is jdk9+). Otherwise, when dealt with different paths, changeset applied cleanly (except for copyright line, which was done manually).
Fixed tests:
javax/sql/testng/test/rowset/spi/SyncFactoryPermissionsTests.java
java/sql/testng/test/sql/DriverManagerPermissionsTests.java
Exception:
java.security.AccessControlException: access denied ("java.util.PropertyPermission" "testng.thread.affinity" "read")
at java.security.AccessControlContext.checkPermission(AccessControlContext.java:472)
at java.security.AccessController.checkPermission(AccessController.java:886)
at java.lang.SecurityManager.checkPermission(SecurityManager.java:549)
at java.lang.SecurityManager.checkPropertyAccess(SecurityManager.java:1294)
at java.lang.System.getProperty(System.java:769)
at org.testng.internal.RuntimeBehavior.enforceThreadAffinity(RuntimeBehavior.java:106)
at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:111)
at java.util.ArrayList.forEach(ArrayList.java:1259)
at org.testng.TestRunner.privateRun(TestRunner.java:764)
at org.testng.TestRunner.run(TestRunner.java:585)
at org.testng.SuiteRunner.runTest(SuiteRunner.java:384)
at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:378)
at org.testng.SuiteRunner.privateRun(SuiteRunner.java:337)
at org.testng.SuiteRunner.run(SuiteRunner.java:286)
at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:53)
at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:96)
at org.testng.TestNG.runSuitesSequentially(TestNG.java:1218)
at org.testng.TestNG.runSuitesLocally(TestNG.java:1140)
at org.testng.TestNG.runSuites(TestNG.java:1069)
at org.testng.TestNG.run(TestNG.java:1037)
at com.sun.javatest.regtest.agent.TestNGRunner.main(TestNGRunner.java:94)
at com.sun.javatest.regtest.agent.TestNGRunner.main(TestNGRunner.java:54)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:127)
at java.lang.Thread.run(Thread.java:750)
Progress
- [ ] Change must be properly reviewed (1 review required, with at least 1 Reviewer)
- [x] Change must not contain extraneous whitespace
- [x] Commit message must refer to an issue
- [ ] JDK-8265019 needs maintainer approval
Issue
- JDK-8265019: Update tests for additional TestNG test permissions (Bug - P3)
Reviewing
Using git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk8u-dev.git pull/469/head:pull/469
$ git checkout pull/469
Update a local copy of the PR:
$ git checkout pull/469
$ git pull https://git.openjdk.org/jdk8u-dev.git pull/469/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 469
View PR using the GUI difftool:
$ git pr show -t 469
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk8u-dev/pull/469.diff
Webrev
:wave: Welcome back zzambers! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.
❗ This change is not yet ready to be integrated. See the Progress checklist in the description for automated requirements.
This backport pull request has now been updated with issue from the original commit.
Testing: GHA: OK (jdk/tier1 failures unrelated, see JDK-8324583, one hotspot/tier1 timeout error on linux/x86 unrelated)
locally tested tests in javax/sql and java/sql - OK (no failures)
@zzambers This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply add a new comment to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration!
@zzambers This pull request has been inactive for more than 8 weeks and will now be automatically closed. If you would like to continue working on this pull request in the future, feel free to reopen it! This can be done using the /open pull request command.
/open
@zzambers This pull request is now open
@zzambers This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply add a new comment to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration!
@zzambers This pull request has been inactive for more than 8 weeks and will now be automatically closed. If you would like to continue working on this pull request in the future, feel free to reopen it! This can be done using the /open pull request command.