RFR: 8257966: Instrument test/jdk/java/nio/channels/spi/SelectorProvider/inheritedChannel/StateTestService.java [v2]
Alan Bateman
alanb at openjdk.java.net
Thu Dec 10 12:08:40 UTC 2020
On Thu, 10 Dec 2020 12:00:49 GMT, Michael McMahon <michaelm at openjdk.org> wrote:
>> Could I get the following small (temporary) test change reviewed please?
>>
>> It adds some printlns to a file from a process launched by the inetd/launch simulator in the regression tests.
>> Normal stderr, stdout is not available in that context.
>>
>> Thanks,
>> Michael.
>
> Michael McMahon has updated the pull request incrementally with two additional commits since the last revision:
>
> - updated and working, ready for review again
> - intermediate non functioning state
test/jdk/java/nio/channels/spi/SelectorProvider/inheritedChannel/StateTestService.java line 65:
> 63:
> 64: static String logDir;
> 65: static PrintStream p;
Might be clear so you "ps" or "out" here rather than "p"
test/jdk/java/nio/channels/spi/SelectorProvider/inheritedChannel/StateTestService.java line 75:
> 73: try {
> 74: Path path = Path.of(logDir, "statetest.txt");
> 75: FileOutputStream f = new FileOutputStream(path.toFile(), true);
This appends, is that intended? You could use Files.newOutputStream here to avoid the lossy conversion to File.
test/jdk/java/nio/channels/spi/SelectorProvider/inheritedChannel/java.policy.fail line 3:
> 1: //
> 2: //
> 3: //
Are the empty lines significant?
-------------
PR: https://git.openjdk.java.net/jdk/pull/1714
More information about the nio-dev
mailing list