Skip to content

Memoryfilesystem#450

Merged
ascopes merged 6 commits intoascopes:feature/GH-311from
marschall:memoryfilesystem
May 7, 2023
Merged

Memoryfilesystem#450
ascopes merged 6 commits intoascopes:feature/GH-311from
marschall:memoryfilesystem

Conversation

@marschall
Copy link
Copy Markdown
Contributor

This PR does some of the work to switch from Jimfs to memoryfilesystem.

This has failing tests:

  • JimfsFileSystemProviderImplTest.theCreatedFileSystemSupportsDirectoryStreams:166 » IllegalState #iterator() already called. DirectoryStream#iterator() is specified to throw IllegalStateException if the iterator has already been returned
  • JarFactoryImplTest.exceptionRaisedIfOutputJarDirectoryDoesNotExist:76
Expecting message to be:
  "/some-non-existent-directory/HelloWorld.jar"
but was:
  "/some-non-existent-directory"

assertions on exception messages are quite brittle. It would probably be safer to use java.nio.file.FileSystemException#getFile()

  • FileUtilsTest.retrieveRequiredUrlCanDereferencePathsToUrls:89
Expecting actual:
  "memory:45377dad-eb8b-42ac-96df-5d3d9f18e5c9:///foo/bar/baz.txt"
to start with:
  "memory://"

The JimfsFileSystemProviderImpl* classes should probably be renamed.

I do not plan to put any more work into this PR.

@ascopes
Copy link
Copy Markdown
Owner

ascopes commented May 7, 2023

Thanks for taking a look on your side and putting the work into putting this up, it is greatly appreciated! Will merge this into a feature branch on my side to have a play with getting some of those tests running.

Looks all good to me though!

@ascopes ascopes changed the base branch from main to feature/GH-311 May 7, 2023 13:18
@ascopes ascopes merged commit 8173bf8 into ascopes:feature/GH-311 May 7, 2023
@ascopes ascopes self-assigned this May 7, 2023
@ascopes ascopes added the new feature A new feature label May 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

new feature A new feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants