Skip to content

LibGit2Sharp.Tests.FilterFixture.CanFilterLargeFiles failed #2180

@mrjens14

Description

@mrjens14

We get always the exception for a blob-file that ... it could not be opened because it is being used by another process. This exception is thrown by the exception handler in filter.cs , Log.Write(LogLevel.Error, "Filter.StreamWriteCallback exception"); It seems that you rely on exclusive file access when using the stream writer (StreamWriteCallback) with the FileShare.None option. But that assumption may not be correct in this case. git_futils_open_ro opens the blob file in question (read mode), and the file is still open while the stream writer in C is starting. We could trace the file handle on Windows. We follow your advice and use the LibGit2TestPath environment variable to be sure that we have complete control over the output test folder, and we observed that Resource Monitor reports the blob file as being locked by the test engine itself. This is our call stack:

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions