[crac] RFR: Adapted some FileDescriptor tests for Win [v5]

Anton Kozlov akozlov at openjdk.org
Tue Jul 25 07:29:06 UTC 2023


On Tue, 25 Jul 2023 07:11:23 GMT, Roman Marchenko <rmarchenko at openjdk.org> wrote:

>> Made changes regarding FileDescriptor for Win platform, adapted some tests.
>
> Roman Marchenko has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Moving macro outside func to make it clearer

src/java.base/windows/classes/sun/net/www/protocol/jar/JarFileFactory.java line 271:

> 269: 
> 270:     @Override
> 271:     public void beforeCheckpoint(Context<? extends Resource> context) throws Exception {

It seems strange windows has it's own JarFileFactory, mostly duplicating a similar one. I'm fine with the current implementation, but it also seems possible to refactor and extract a single common resource implementation for windows and linux.

test/jdk/jdk/crac/fileDescriptors/OpenFileDetectionTest.java line 48:

> 46:         cp.outputAnalyzer()
> 47:                 .shouldHaveExitValue(1)
> 48:                 .shouldMatch("CheckpointOpenFileException: filename1.txt") // RandomAccessFile should have the expected format

Waiting for test results, don't we have absolute file path on linux?

test/jdk/jdk/crac/fileDescriptors/OpenFileDetectionTest.java line 55:

> 53:     @Override
> 54:     public void exec() throws Exception {
> 55:         {

Unnecessary curly brackets

-------------

PR Review Comment: https://git.openjdk.org/crac/pull/91#discussion_r1273113209
PR Review Comment: https://git.openjdk.org/crac/pull/91#discussion_r1273113945
PR Review Comment: https://git.openjdk.org/crac/pull/91#discussion_r1273099371


More information about the crac-dev mailing list