Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix erratic test failure in DiagnosticsTest #984

Merged
merged 1 commit into from
May 3, 2024

Commits on May 3, 2024

  1. Fix erratic test failure in DiagnosticsTest

    This commit fixes the erratic test failure `FileSystemException: The
    process cannot access the file because it is being used by another
    process seen` on Windows in
    `DiagnosticsTest#testDiagnosticsForMarkerUpdateAfterDeletedFile`:
    
    ```
    org.eclipse.core.internal.resources.ResourceException: Problems
    encountered while deleting resources.
    	at org.eclipse.core.internal.resources.Resource.delete(Resource.java:816)
    	at org.eclipse.core.internal.resources.Resource.delete(Resource.java:772)
    	at org.eclipse.lsp4e.test.diagnostics.DiagnosticsTest.testDiagnosticsForMarkerUpdateAfterDeletedFile(DiagnosticsTest.java:192)
    Contains: Could not delete
    'D:\junit-workspace\DiagnoticsTest1714763955417\test1714763955426.lspt'.
    org.eclipse.core.runtime.CoreException: Could not delete:
    D:\junit-workspace\DiagnoticsTest1714763955417\test1714763955426.lspt.
    	at org.eclipse.core.internal.filesystem.local.LocalFile.delete(LocalFile.java:161)
    	at org.eclipse.core.internal.resources.ResourceTree.internalDeleteFile(ResourceTree.java:315)
    	at org.eclipse.core.internal.resources.ResourceTree.standardDeleteFile(ResourceTree.java:801)
    	at org.eclipse.core.internal.resources.Resource.unprotectedDelete(Resource.java:1826)
    	at org.eclipse.core.internal.resources.Resource.delete(Resource.java:803)
    	at org.eclipse.core.internal.resources.Resource.delete(Resource.java:772)
    	at org.eclipse.lsp4e.test.diagnostics.DiagnosticsTest.testDiagnosticsForMarkerUpdateAfterDeletedFile(DiagnosticsTest.java:192)
    Caused by: java.nio.file.FileSystemException:
    D:\junit-workspace\DiagnoticsTest1714763955417\test1714763955426.lspt:
    The process cannot access the file because it is being used by another
    process
    	at java.base/sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:92)
    	at java.base/sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:103)
    	at java.base/sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:108)
    	at java.base/sun.nio.fs.WindowsFileSystemProvider.implDelete(WindowsFileSystemProvider.java:275)
    	at java.base/sun.nio.fs.AbstractFileSystemProvider.deleteIfExists(AbstractFileSystemProvider.java:110)
    	at java.base/java.nio.file.Files.deleteIfExists(Files.java:1191)
    	at org.eclipse.core.internal.filesystem.local.LocalFile.internalDelete(LocalFile.java:242)
    	at org.eclipse.core.internal.filesystem.local.LocalFile.delete(LocalFile.java:159)
    	... 64 more
    ```
    sebthom committed May 3, 2024
    Configuration menu
    Copy the full SHA
    98c356a View commit details
    Browse the repository at this point in the history