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

Commit 57dccc4

Browse files
Merge pull request #582 from github-for-unity/shana/fix-test-deadlock
Fix a potential deadlock
2 parents 4ff9775 + 8b06908 commit 57dccc4

File tree

1 file changed

+8
-12
lines changed

1 file changed

+8
-12
lines changed

src/tests/IntegrationTests/Git/GitClientTests.cs

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,40 +10,36 @@ namespace IntegrationTests
1010
class GitClientTests : BaseGitEnvironmentTest
1111
{
1212
[Test]
13-
public void ShouldGetGitVersion()
13+
public async Task ShouldGetGitVersion()
1414
{
1515
Initialize(TestRepoMasterCleanSynchronized);
1616

17-
var version = GitClient.Version();
18-
version.Start().Wait();
17+
var result = await GitClient.Version().StartAwait();
1918

20-
var versionResult = version.Result;
2119
if (Environment.IsWindows)
2220
{
23-
versionResult.Should().Be(new Version(2,11,1));
21+
result.Should().Be(new Version(2,11,1));
2422
}
2523
else
2624
{
27-
versionResult.Should().NotBeNull();
25+
result.Should().NotBeNull();
2826
}
2927
}
3028

3129
[Test]
32-
public void ShouldGetGitLfsVersion()
30+
public async Task ShouldGetGitLfsVersion()
3331
{
3432
Initialize(TestRepoMasterCleanSynchronized);
3533

36-
var version = GitClient.LfsVersion();
37-
version.Start().Wait();
34+
var result = await GitClient.LfsVersion().StartAwait();
3835

39-
var versionResult = version.Result;
4036
if (Environment.IsWindows)
4137
{
42-
versionResult.Should().Be(new Version(2, 3, 4));
38+
result.Should().Be(new Version(2, 3, 4));
4339
}
4440
else
4541
{
46-
versionResult.Should().NotBeNull();
42+
result.Should().NotBeNull();
4743
}
4844
}
4945
}

0 commit comments

Comments
 (0)