Skip to content
This repository was archived by the owner on Dec 5, 2024. It is now read-only.

Commit ba24c19

Browse files
committed
Fix integration test git installer step
1 parent 069a34a commit ba24c19

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

src/tests/IntegrationTests/BaseIntegrationTest.cs

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
using System.Linq;
99
using System.IO;
1010
using System.Runtime.CompilerServices;
11+
using System.Threading.Tasks;
1112

1213
namespace IntegrationTests
1314
{
@@ -160,16 +161,13 @@ protected void SetupGit(NPath pathToSetupGitInto, string testName)
160161
NPath? result = null;
161162
Exception ex = null;
162163

163-
var setupTask = gitInstaller.SetupGitIfNeeded();
164-
setupTask.OnEnd += (thisTask, _, __, ___) => {
165-
((ITask<GitInstaller.GitInstallationState>)thisTask.GetEndOfChain()).OnEnd += (t, state, success, exception) =>
164+
var setupTask = gitInstaller.SetupGitIfNeeded().Finally((success, state) =>
166165
{
167166
result = state.GitExecutablePath;
168-
ex = exception;
169167
autoResetEvent.Set();
170-
};
171-
};
168+
});
172169
setupTask.Start();
170+
173171
if (!autoResetEvent.WaitOne(TimeSpan.FromMinutes(5)))
174172
throw new TimeoutException($"Test setup unzipping {zipArchivesPath} to {pathToSetupGitInto} timed out");
175173

0 commit comments

Comments
 (0)