Skip to content

Commit

Permalink
Mitigate Submodule_RecognizedWithCorrectVersion instability
Browse files Browse the repository at this point in the history
  • Loading branch information
AArnott committed Jun 8, 2017
1 parent 2ad35fe commit e1be204
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions src/NerdBank.GitVersioning.Tests/TestUtilities.cs
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,18 @@ internal static ExpandedRepo ExtractRepoArchive(string repoArchiveName)
ExtractEmbeddedResource($"repos.{repoArchiveName}.7z", archiveFilePath);
try
{
var extractor = new SevenZipExtractor(archiveFilePath);
extractor.ExtractAll(expandedFolderPath);
return new ExpandedRepo(expandedFolderPath);
for (int retryCount = 0; ; retryCount++)
{
try
{
var extractor = new SevenZipExtractor(archiveFilePath);
extractor.ExtractAll(expandedFolderPath);
return new ExpandedRepo(expandedFolderPath);
}
catch (System.ComponentModel.Win32Exception) when (retryCount < 2)
{
}
}
}
finally
{
Expand Down

0 comments on commit e1be204

Please sign in to comment.