From kevinw at openjdk.org Wed Oct 9 17:31:06 2024 From: kevinw at openjdk.org (Kevin Walls) Date: Wed, 9 Oct 2024 17:31:06 GMT Subject: jmx-dev RFR: 8338603: DiagnosticCommandMBean operations should standardize types for parameters In-Reply-To: References: Message-ID: On Tue, 17 Sep 2024 14:10:07 GMT, Kevin Walls wrote: > DiagnosticCommandImpl should only publish parameter types in a known standard set, and use "STRING" on anything else. > e.g. We can say "FILE" in the help output for jcmd, as that's for humans, but the MBean parameter info should contain "STRING". Hi, Looking for input. We do _need_ this change, or something like it, as we have the FILE type out there in the product, and JMC does not understand it (nor would any other app). ------------- PR Comment: https://git.openjdk.org/jdk/pull/21040#issuecomment-2402897334 From cjplummer at openjdk.org Wed Oct 9 20:39:12 2024 From: cjplummer at openjdk.org (Chris Plummer) Date: Wed, 9 Oct 2024 20:39:12 GMT Subject: jmx-dev RFR: 8338603: DiagnosticCommandMBean operations should standardize types for parameters In-Reply-To: References: Message-ID: On Tue, 17 Sep 2024 14:10:07 GMT, Kevin Walls wrote: > DiagnosticCommandImpl should only publish parameter types in a known standard set, and use "STRING" on anything else. > e.g. We can say "FILE" in the help output for jcmd, as that's for humans, but the MBean parameter info should contain "STRING". test/jdk/com/sun/management/DiagnosticCommandMBean/DcmdMBeanTest.java line 133: > 131: > 132: // Knowledge of the types made public by com.sun.management.internal.DiagnosticCommandImpl > 133: private static final String [] publicTypes = new String [] { "INT", "STRING", "BOOLEAN", "STRING SET", "MEMORY SIZE", "NANOTIME" }; These type are "implementation dependent", yet we are referring to them as public types. Also, these "public types" are now in two different places. If they were public, only one copy should be needed. Maybe we just need better terminology since they are not actually public, but just happen to be the types the implementation is know to return...err, I guess you could say the leak out to the "public". Sigh. IDK. I guess I just feel we could do a better job in how we refer to these types in the code. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/21040#discussion_r1794193671 From kevinw at openjdk.org Thu Oct 10 08:12:11 2024 From: kevinw at openjdk.org (Kevin Walls) Date: Thu, 10 Oct 2024 08:12:11 GMT Subject: jmx-dev RFR: 8338603: DiagnosticCommandMBean operations should standardize types for parameters In-Reply-To: References: Message-ID: On Wed, 9 Oct 2024 20:36:07 GMT, Chris Plummer wrote: >> DiagnosticCommandImpl should only publish parameter types in a known standard set, and use "STRING" on anything else. >> e.g. We can say "FILE" in the help output for jcmd, as that's for humans, but the MBean parameter info should contain "STRING". > > test/jdk/com/sun/management/DiagnosticCommandMBean/DcmdMBeanTest.java line 133: > >> 131: >> 132: // Knowledge of the types made public by com.sun.management.internal.DiagnosticCommandImpl >> 133: private static final String [] publicTypes = new String [] { "INT", "STRING", "BOOLEAN", "STRING SET", "MEMORY SIZE", "NANOTIME" }; > > These type are "implementation dependent", yet we are referring to them as public types. Also, these "public types" are now in two different places. If they were public, only one copy should be needed. Maybe we just need better terminology since they are not actually public, but just happen to be the types the implementation is know to return...err, I guess you could say the leak out to the "public". Sigh. IDK. I guess I just feel we could do a better job in how we refer to these types in the code. Right, public as in the type names which are observable by applications/users, not as in Java type terminology. Comment could be: // Knowledge of the implementation-dependent types in DiagnosticCommandImpl, seen by applications/users // (see the DiagnosticCommandMBean Descriptor, field "dcmd.arg.type"). ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/21040#discussion_r1794931004 From kevinw at openjdk.org Thu Oct 10 08:51:38 2024 From: kevinw at openjdk.org (Kevin Walls) Date: Thu, 10 Oct 2024 08:51:38 GMT Subject: jmx-dev RFR: 8338603: DiagnosticCommandMBean operations should standardize types for parameters [v2] In-Reply-To: References: Message-ID: > DiagnosticCommandImpl should only publish parameter types in a known standard set, and use "STRING" on anything else. > e.g. We can say "FILE" in the help output for jcmd, as that's for humans, but the MBean parameter info should contain "STRING". Kevin Walls has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains four additional commits since the last revision: - Merge remote-tracking branch 'upstream/master' into 8338603_dcmd_mbean_types - Update comment about type name knowledge - Test update - 8338603: DiagnosticCommandMBean operations should standardize types for parameters. ------------- Changes: - all: https://git.openjdk.org/jdk/pull/21040/files - new: https://git.openjdk.org/jdk/pull/21040/files/aa22301c..fabcaebe Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=21040&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=21040&range=00-01 Stats: 198321 lines in 1421 files changed: 184773 ins; 6839 del; 6709 mod Patch: https://git.openjdk.org/jdk/pull/21040.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/21040/head:pull/21040 PR: https://git.openjdk.org/jdk/pull/21040 From cjplummer at openjdk.org Fri Oct 11 04:22:12 2024 From: cjplummer at openjdk.org (Chris Plummer) Date: Fri, 11 Oct 2024 04:22:12 GMT Subject: jmx-dev RFR: 8338603: DiagnosticCommandMBean operations should standardize types for parameters [v2] In-Reply-To: References: Message-ID: On Thu, 10 Oct 2024 08:51:38 GMT, Kevin Walls wrote: >> DiagnosticCommandImpl should only publish parameter types in a known standard set, and use "STRING" on anything else. >> e.g. We can say "FILE" in the help output for jcmd, as that's for humans, but the MBean parameter info should contain "STRING". > > Kevin Walls has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains four additional commits since the last revision: > > - Merge remote-tracking branch 'upstream/master' into 8338603_dcmd_mbean_types > - Update comment about type name knowledge > - Test update > - 8338603: DiagnosticCommandMBean operations should standardize types for parameters. Marked as reviewed by cjplummer (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/21040#pullrequestreview-2361929093 From kevinw at openjdk.org Tue Oct 15 08:21:18 2024 From: kevinw at openjdk.org (Kevin Walls) Date: Tue, 15 Oct 2024 08:21:18 GMT Subject: jmx-dev RFR: 8338603: DiagnosticCommandMBean operations should standardize types for parameters [v2] In-Reply-To: References: Message-ID: On Thu, 10 Oct 2024 08:51:38 GMT, Kevin Walls wrote: >> DiagnosticCommandImpl should only publish parameter types in a known standard set, and use "STRING" on anything else. >> e.g. We can say "FILE" in the help output for jcmd, as that's for humans, but the MBean parameter info should contain "STRING". > > Kevin Walls has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains four additional commits since the last revision: > > - Merge remote-tracking branch 'upstream/master' into 8338603_dcmd_mbean_types > - Update comment about type name knowledge > - Test update > - 8338603: DiagnosticCommandMBean operations should standardize types for parameters. Thanks Chris. Hoping to get a second approval. Would be great to get this change done, then I can go back and know that the man page change in https://github.com/openjdk/jdk/pull/20401 will be correct. ------------- PR Comment: https://git.openjdk.org/jdk/pull/21040#issuecomment-2413205144 From egahlin at openjdk.org Tue Oct 15 08:34:13 2024 From: egahlin at openjdk.org (Erik Gahlin) Date: Tue, 15 Oct 2024 08:34:13 GMT Subject: jmx-dev RFR: 8338603: DiagnosticCommandMBean operations should standardize types for parameters [v2] In-Reply-To: References: Message-ID: On Thu, 10 Oct 2024 08:51:38 GMT, Kevin Walls wrote: >> DiagnosticCommandImpl should only publish parameter types in a known standard set, and use "STRING" on anything else. >> e.g. We can say "FILE" in the help output for jcmd, as that's for humans, but the MBean parameter info should contain "STRING". > > Kevin Walls has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains four additional commits since the last revision: > > - Merge remote-tracking branch 'upstream/master' into 8338603_dcmd_mbean_types > - Update comment about type name knowledge > - Test update > - 8338603: DiagnosticCommandMBean operations should standardize types for parameters. Marked as reviewed by egahlin (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/21040#pullrequestreview-2368548822 From kevinw at openjdk.org Tue Oct 15 08:34:14 2024 From: kevinw at openjdk.org (Kevin Walls) Date: Tue, 15 Oct 2024 08:34:14 GMT Subject: jmx-dev RFR: 8338603: DiagnosticCommandMBean operations should standardize types for parameters [v2] In-Reply-To: References: Message-ID: On Thu, 10 Oct 2024 08:51:38 GMT, Kevin Walls wrote: >> DiagnosticCommandImpl should only publish parameter types in a known standard set, and use "STRING" on anything else. >> e.g. We can say "FILE" in the help output for jcmd, as that's for humans, but the MBean parameter info should contain "STRING". > > Kevin Walls has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains four additional commits since the last revision: > > - Merge remote-tracking branch 'upstream/master' into 8338603_dcmd_mbean_types > - Update comment about type name knowledge > - Test update > - 8338603: DiagnosticCommandMBean operations should standardize types for parameters. Thanks Erik! ------------- PR Comment: https://git.openjdk.org/jdk/pull/21040#issuecomment-2413233734 From kevinw at openjdk.org Tue Oct 15 08:53:39 2024 From: kevinw at openjdk.org (Kevin Walls) Date: Tue, 15 Oct 2024 08:53:39 GMT Subject: jmx-dev RFR: 8338603: DiagnosticCommandMBean operations should standardize types for parameters [v3] In-Reply-To: References: Message-ID: > DiagnosticCommandImpl should only publish parameter types in a known standard set, and use "STRING" on anything else. > e.g. We can say "FILE" in the help output for jcmd, as that's for humans, but the MBean parameter info should contain "STRING". Kevin Walls has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains five additional commits since the last revision: - Merge remote-tracking branch 'upstream/master' into 8338603_dcmd_mbean_types - Merge remote-tracking branch 'upstream/master' into 8338603_dcmd_mbean_types - Update comment about type name knowledge - Test update - 8338603: DiagnosticCommandMBean operations should standardize types for parameters. ------------- Changes: - all: https://git.openjdk.org/jdk/pull/21040/files - new: https://git.openjdk.org/jdk/pull/21040/files/fabcaebe..70312190 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=21040&range=02 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=21040&range=01-02 Stats: 14306 lines in 284 files changed: 12064 ins; 1035 del; 1207 mod Patch: https://git.openjdk.org/jdk/pull/21040.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/21040/head:pull/21040 PR: https://git.openjdk.org/jdk/pull/21040 From kevinw at openjdk.org Tue Oct 15 10:53:15 2024 From: kevinw at openjdk.org (Kevin Walls) Date: Tue, 15 Oct 2024 10:53:15 GMT Subject: jmx-dev Integrated: 8338603: DiagnosticCommandMBean operations should standardize types for parameters In-Reply-To: References: Message-ID: <3_K1g-JQznKDxhE2V1oEGiE5WKM9R__ullYvDxd73c8=.6712eeb9-d159-4040-a94a-082a4d282772@github.com> On Tue, 17 Sep 2024 14:10:07 GMT, Kevin Walls wrote: > DiagnosticCommandImpl should only publish parameter types in a known standard set, and use "STRING" on anything else. > e.g. We can say "FILE" in the help output for jcmd, as that's for humans, but the MBean parameter info should contain "STRING". This pull request has now been integrated. Changeset: df7d6e08 Author: Kevin Walls URL: https://git.openjdk.org/jdk/commit/df7d6e081ff9513fbd6cff5d033a307e6798418b Stats: 58 lines in 2 files changed: 50 ins; 0 del; 8 mod 8338603: DiagnosticCommandMBean operations should standardize types for parameters Reviewed-by: cjplummer, egahlin ------------- PR: https://git.openjdk.org/jdk/pull/21040 From kevinw at openjdk.org Wed Oct 16 11:19:18 2024 From: kevinw at openjdk.org (Kevin Walls) Date: Wed, 16 Oct 2024 11:19:18 GMT Subject: jmx-dev RFR: 8342338: Remove redundant IIOPURLTest.java Message-ID: This test has been "skipping" since IIOP was removed (jdk 9). Should be removed, no impact. ------------- Commit messages: - 8342338: Remove redundant IIOPURLTest.java Changes: https://git.openjdk.org/jdk/pull/21534/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=21534&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8342338 Stats: 79 lines in 1 file changed: 0 ins; 79 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/21534.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/21534/head:pull/21534 PR: https://git.openjdk.org/jdk/pull/21534 From cjplummer at openjdk.org Wed Oct 16 18:20:10 2024 From: cjplummer at openjdk.org (Chris Plummer) Date: Wed, 16 Oct 2024 18:20:10 GMT Subject: jmx-dev RFR: 8342338: Remove redundant IIOPURLTest.java In-Reply-To: References: Message-ID: On Wed, 16 Oct 2024 11:14:44 GMT, Kevin Walls wrote: > This test has been "skipping" since IIOP was removed (jdk 9). Should be removed, no impact. Marked as reviewed by cjplummer (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/21534#pullrequestreview-2373312903 From amenkov at openjdk.org Wed Oct 16 22:39:12 2024 From: amenkov at openjdk.org (Alex Menkov) Date: Wed, 16 Oct 2024 22:39:12 GMT Subject: jmx-dev RFR: 8342338: Remove redundant IIOPURLTest.java In-Reply-To: References: Message-ID: On Wed, 16 Oct 2024 11:14:44 GMT, Kevin Walls wrote: > This test has been "skipping" since IIOP was removed (jdk 9). Should be removed, no impact. Marked as reviewed by amenkov (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/21534#pullrequestreview-2373803823 From kevinw at openjdk.org Thu Oct 17 08:04:16 2024 From: kevinw at openjdk.org (Kevin Walls) Date: Thu, 17 Oct 2024 08:04:16 GMT Subject: jmx-dev RFR: 8342338: Remove redundant IIOPURLTest.java In-Reply-To: References: Message-ID: On Wed, 16 Oct 2024 11:14:44 GMT, Kevin Walls wrote: > This test has been "skipping" since IIOP was removed (jdk 9). Should be removed, no impact. Thanks for the reviews! ------------- PR Comment: https://git.openjdk.org/jdk/pull/21534#issuecomment-2418837171 From kevinw at openjdk.org Thu Oct 17 08:04:17 2024 From: kevinw at openjdk.org (Kevin Walls) Date: Thu, 17 Oct 2024 08:04:17 GMT Subject: jmx-dev Integrated: 8342338: Remove redundant IIOPURLTest.java In-Reply-To: References: Message-ID: On Wed, 16 Oct 2024 11:14:44 GMT, Kevin Walls wrote: > This test has been "skipping" since IIOP was removed (jdk 9). Should be removed, no impact. This pull request has now been integrated. Changeset: 8862ca07 Author: Kevin Walls URL: https://git.openjdk.org/jdk/commit/8862ca076f9be1c0b5f4bc2639ab9c1f60de308c Stats: 79 lines in 1 file changed: 0 ins; 79 del; 0 mod 8342338: Remove redundant IIOPURLTest.java Reviewed-by: cjplummer, amenkov ------------- PR: https://git.openjdk.org/jdk/pull/21534 From kevinw at openjdk.org Mon Oct 21 09:28:44 2024 From: kevinw at openjdk.org (Kevin Walls) Date: Mon, 21 Oct 2024 09:28:44 GMT Subject: jmx-dev RFR: 8342633: javax/management/security/HashedPasswordFileTest.java creates tmp file in src dir Message-ID: Test update: HashedPasswordFileTest.java was using System.getProperty("test.src") as a place to _create_ a file. jtreg gives us the current working directory for the test invocation as a scratch directory. Create files there, without reading any property to find another location. ------------- Commit messages: - 8342633: javax/management/security/HashedPasswordFileTest.java creates tmp file in src dir Changes: https://git.openjdk.org/jdk/pull/21602/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=21602&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8342633 Stats: 3 lines in 1 file changed: 0 ins; 2 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/21602.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/21602/head:pull/21602 PR: https://git.openjdk.org/jdk/pull/21602 From dfuchs at openjdk.org Mon Oct 21 15:25:20 2024 From: dfuchs at openjdk.org (Daniel Fuchs) Date: Mon, 21 Oct 2024 15:25:20 GMT Subject: jmx-dev RFR: 8342633: javax/management/security/HashedPasswordFileTest.java creates tmp file in src dir In-Reply-To: References: Message-ID: On Mon, 21 Oct 2024 09:21:35 GMT, Kevin Walls wrote: > Test update: HashedPasswordFileTest.java was using System.getProperty("test.src") as a place to _create_ a file. > > jtreg gives us the current working directory for the test invocation as a scratch directory. Create files there, without reading any property to find another location. LGTM ------------- Marked as reviewed by dfuchs (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/21602#pullrequestreview-2382461596 From amenkov at openjdk.org Tue Oct 22 00:44:15 2024 From: amenkov at openjdk.org (Alex Menkov) Date: Tue, 22 Oct 2024 00:44:15 GMT Subject: jmx-dev RFR: 8342633: javax/management/security/HashedPasswordFileTest.java creates tmp file in src dir In-Reply-To: References: Message-ID: <7nsVEtFl6mygeAPpKe-1ENJGpur2fZjmyDu29qtaPGY=.745fa80d-74d3-4df3-99da-01d430c6d392@github.com> On Mon, 21 Oct 2024 09:21:35 GMT, Kevin Walls wrote: > Test update: HashedPasswordFileTest.java was using System.getProperty("test.src") as a place to _create_ a file. > > jtreg gives us the current working directory for the test invocation as a scratch directory. Create files there, without reading any property to find another location. Marked as reviewed by amenkov (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/21602#pullrequestreview-2383533706 From kevinw at openjdk.org Tue Oct 22 08:32:20 2024 From: kevinw at openjdk.org (Kevin Walls) Date: Tue, 22 Oct 2024 08:32:20 GMT Subject: jmx-dev RFR: 8342633: javax/management/security/HashedPasswordFileTest.java creates tmp file in src dir In-Reply-To: References: Message-ID: On Mon, 21 Oct 2024 09:21:35 GMT, Kevin Walls wrote: > Test update: HashedPasswordFileTest.java was using System.getProperty("test.src") as a place to _create_ a file. > > jtreg gives us the current working directory for the test invocation as a scratch directory. Create files there, without reading any property to find another location. Thanks for reviewing, Daniel and Alex! ------------- PR Comment: https://git.openjdk.org/jdk/pull/21602#issuecomment-2428610104 From kevinw at openjdk.org Tue Oct 22 08:32:20 2024 From: kevinw at openjdk.org (Kevin Walls) Date: Tue, 22 Oct 2024 08:32:20 GMT Subject: jmx-dev Integrated: 8342633: javax/management/security/HashedPasswordFileTest.java creates tmp file in src dir In-Reply-To: References: Message-ID: On Mon, 21 Oct 2024 09:21:35 GMT, Kevin Walls wrote: > Test update: HashedPasswordFileTest.java was using System.getProperty("test.src") as a place to _create_ a file. > > jtreg gives us the current working directory for the test invocation as a scratch directory. Create files there, without reading any property to find another location. This pull request has now been integrated. Changeset: de441c2b Author: Kevin Walls URL: https://git.openjdk.org/jdk/commit/de441c2b6891ad475f516d14b793efbe65f1477c Stats: 3 lines in 1 file changed: 0 ins; 2 del; 1 mod 8342633: javax/management/security/HashedPasswordFileTest.java creates tmp file in src dir Reviewed-by: dfuchs, amenkov ------------- PR: https://git.openjdk.org/jdk/pull/21602 From kevinw at openjdk.org Thu Oct 31 12:17:41 2024 From: kevinw at openjdk.org (Kevin Walls) Date: Thu, 31 Oct 2024 12:17:41 GMT Subject: jmx-dev RFR: 8343378: Exceptions in javax/management DeadLockTest.java do not cause test failure Message-ID: <-gJdcK0JYzbY92LW6AhSuhNbf5wRF-RdsYYCoHdhIfI=.54d5b240-e7c2-42e7-82d0-93835a141bd4@github.com> Test update: fail when it hits an Exception. This test still references jmxmp and iiop, which are of course redundant, there are various tests that still do this. I am working on http, so we may revisit these tests in future to change their list of protocols. For now, I'd like to simply make this test fail if any of the protocols it tests have failures. Fix a few typos while we are here. ------------- Commit messages: - 8343378: Exceptions in javax/management DeadLockTest.java do not cause test failure Changes: https://git.openjdk.org/jdk/pull/21804/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=21804&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8343378 Stats: 11 lines in 1 file changed: 4 ins; 1 del; 6 mod Patch: https://git.openjdk.org/jdk/pull/21804.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/21804/head:pull/21804 PR: https://git.openjdk.org/jdk/pull/21804 From cjplummer at openjdk.org Thu Oct 31 19:13:29 2024 From: cjplummer at openjdk.org (Chris Plummer) Date: Thu, 31 Oct 2024 19:13:29 GMT Subject: jmx-dev RFR: 8343378: Exceptions in javax/management DeadLockTest.java do not cause test failure In-Reply-To: <-gJdcK0JYzbY92LW6AhSuhNbf5wRF-RdsYYCoHdhIfI=.54d5b240-e7c2-42e7-82d0-93835a141bd4@github.com> References: <-gJdcK0JYzbY92LW6AhSuhNbf5wRF-RdsYYCoHdhIfI=.54d5b240-e7c2-42e7-82d0-93835a141bd4@github.com> Message-ID: On Thu, 31 Oct 2024 12:11:41 GMT, Kevin Walls wrote: > Test update: fail when it hits an Exception. > > This test still references jmxmp and iiop, which are of course redundant, there are various tests that still do this. > I am working on http, so we may revisit these tests in future to change their list of protocols. > > For now, I'd like to simply make this test fail if any of the protocols it tests have failures. > Fix a few typos while we are here. test/jdk/javax/management/remote/mandatory/connection/DeadLockTest.java line 54: > 52: test(protocols[i]); > 53: } catch (Exception e) { > 54: fail = true; // any one protocol failure, fails the test Suggestion: fail = true; // any one protocol failure fails the test ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/21804#discussion_r1825048045 From kevinw at openjdk.org Thu Oct 31 20:58:28 2024 From: kevinw at openjdk.org (Kevin Walls) Date: Thu, 31 Oct 2024 20:58:28 GMT Subject: jmx-dev RFR: 8343378: Exceptions in javax/management DeadLockTest.java do not cause test failure In-Reply-To: References: <-gJdcK0JYzbY92LW6AhSuhNbf5wRF-RdsYYCoHdhIfI=.54d5b240-e7c2-42e7-82d0-93835a141bd4@github.com> Message-ID: On Thu, 31 Oct 2024 19:10:38 GMT, Chris Plummer wrote: >> Test update: fail when it hits an Exception. >> >> This test still references jmxmp and iiop, which are of course redundant, there are various tests that still do this. >> I am working on http, so we may revisit these tests in future to change their list of protocols. >> >> For now, I'd like to simply make this test fail if any of the protocols it tests have failures. >> Fix a few typos while we are here. > > test/jdk/javax/management/remote/mandatory/connection/DeadLockTest.java line 54: > >> 52: test(protocols[i]); >> 53: } catch (Exception e) { >> 54: fail = true; // any one protocol failure, fails the test > > Suggestion: > > fail = true; // any one protocol failure fails the test I actually think it's more readable with the comma. If there is (one protocol failure), then that (fails the test). Without the comma, "failure fails" runs together, but the failure did not fail, it was a perfectly good failure. Pause for breath. What do we do now? Well, experiencing that kind of problem, fails the test. Extended discussions on language style, from the test that brought you "listner" and "should no block". 8-) ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/21804#discussion_r1825154594 From cjplummer at openjdk.org Thu Oct 31 22:00:33 2024 From: cjplummer at openjdk.org (Chris Plummer) Date: Thu, 31 Oct 2024 22:00:33 GMT Subject: jmx-dev RFR: 8343378: Exceptions in javax/management DeadLockTest.java do not cause test failure In-Reply-To: References: <-gJdcK0JYzbY92LW6AhSuhNbf5wRF-RdsYYCoHdhIfI=.54d5b240-e7c2-42e7-82d0-93835a141bd4@github.com> Message-ID: <07kSV5FDDKBnyWvsM8qELMdZ7llvUV_l_HjS4sWgT6k=.5bd99d2e-73b8-409a-a1d8-b09a69f23493@github.com> On Thu, 31 Oct 2024 20:55:39 GMT, Kevin Walls wrote: >> test/jdk/javax/management/remote/mandatory/connection/DeadLockTest.java line 54: >> >>> 52: test(protocols[i]); >>> 53: } catch (Exception e) { >>> 54: fail = true; // any one protocol failure, fails the test >> >> Suggestion: >> >> fail = true; // any one protocol failure fails the test > > I actually think it's more readable with the comma. > If there is (one protocol failure), then that (fails the test). > Without the comma, "failure fails" runs together, but the failure did not fail, it was a perfectly good failure. Pause for breath. What do we do now? Well, experiencing that kind of problem, fails the test. > > Extended discussions on language style, from the test that brought you "listner" and "should no block". 8-) The best way to get to the right answer here is simplify to the subject and verb: "failure fails". You don't put a comma between the subject and the verb, unless is something more much complex like "a failure, for which there can be more than one, fails the test". I think the reason you feel it reads better with the comma is because of the repetition of "fail". Would you still want a comma if the sentence was "any one protocol error fails the test"? I assume no, but the sentence is structurally identical. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/21804#discussion_r1825216696