LibGit2Sharp.Tests.FilterFixture.CanFilterLargeFiles failed

Offen
#2,180 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Anfängerfreundlichkeit
25/100
Issue-Typ
Bug
Klarheit
Muss geklärt werden
Aktivitätsstatus
Veraltet
Tech-Stack
csharp, git
Bereich
backend, testing-qa

Rechercherichtung

Beginne mit LibGit2Sharp.Tests.FilterFixture.CanFilterLargeFiles und untersuche filter.cs, insbesondere Filter.StreamWriteCallback und den im Bericht beschriebenen Pfad git_futils_open_ro. Reproduziere den Fehler unter Windows mit gesetztem LibGit2TestPath, verfolge dann die Dateihandles und bestätige, dass der Test ohne die Ausnahme wegen einer verwendeten Datei abgeschlossen wird.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

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
Vorherrschende Sprache
C#
Sterne
3.5k
Forks
925
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus libgit2/libgit2sharp

Alle Issues in libgit2/libgit2sharp

Ähnliche Issues

Weitere Issues zu C#

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.