Skip to content

Commit 57cb77c

Browse files
committed
cleanup
1 parent 6385b43 commit 57cb77c

4 files changed

Lines changed: 9 additions & 9 deletions

File tree

src/DiffEngine.Tests/InlineApplierUnixTests.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,14 @@ public class InlineApplierUnixTests :
2121
public async Task A_symlinked_source_is_followed_to_the_file_it_names()
2222
{
2323
var real = Path.Combine(directory, "Real.cs");
24-
File.WriteAllText(real, source);
24+
await File.WriteAllTextAsync(real, source);
2525
var link = Path.Combine(directory, "Link.cs");
2626
File.CreateSymbolicLink(link, real);
2727

2828
var result = InlineApplier.Apply(Patch(link));
2929

3030
await Assert.That(result.Status).IsEqualTo(InlineApplyStatus.Applied);
31-
await Assert.That(File.ReadAllText(real)).Contains("\"new\"");
31+
await Assert.That(await File.ReadAllTextAsync(real)).Contains("\"new\"");
3232
// Still a link, rather than a regular file holding the patch while the real one holds the
3333
// snapshot that failed
3434
await Assert.That(new FileInfo(link).LinkTarget).IsNotNull();
@@ -45,7 +45,7 @@ public async Task A_symlinked_source_is_followed_to_the_file_it_names()
4545
public async Task The_file_keeps_the_permissions_it_had()
4646
{
4747
var path = Path.Combine(directory, "Sample.cs");
48-
File.WriteAllText(path, source);
48+
await File.WriteAllTextAsync(path, source);
4949
const UnixFileMode mode = UnixFileMode.UserRead | UnixFileMode.UserWrite | UnixFileMode.UserExecute |
5050
UnixFileMode.GroupRead | UnixFileMode.GroupExecute |
5151
UnixFileMode.OtherRead | UnixFileMode.OtherExecute;

src/DiffEngine.Tests/MaxInstanceReplacementTests.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,14 @@ public async Task RelaunchingTheSamePairIsNotANewInstance()
2020
LimitTo(1);
2121

2222
ProcessCleanup.Refresh();
23-
var first = DiffRunner.Launch(temp, target);
23+
var first = await DiffRunner.LaunchAsync(temp, target);
2424
await Assert.That(first).IsEqualTo(LaunchResult.StartedNewInstance);
2525

2626
await WaitForRunning();
2727
ProcessCleanup.Refresh();
2828

2929
// The slot is spent, but this pair is already open - so this is a replacement
30-
var second = DiffRunner.Launch(temp, target);
30+
var second = await DiffRunner.LaunchAsync(temp, target);
3131
await Assert.That(second).IsEqualTo(LaunchResult.StartedNewInstance);
3232
}
3333

@@ -40,10 +40,10 @@ public async Task ADifferentPairStillHitsTheLimit()
4040
LimitTo(1);
4141

4242
ProcessCleanup.Refresh();
43-
await Assert.That(DiffRunner.Launch(temp, target)).IsEqualTo(LaunchResult.StartedNewInstance);
43+
await Assert.That(await DiffRunner.LaunchAsync(temp, target)).IsEqualTo(LaunchResult.StartedNewInstance);
4444

4545
ProcessCleanup.Refresh();
46-
await Assert.That(DiffRunner.Launch(otherTemp, otherTarget)).IsEqualTo(LaunchResult.TooManyRunningDiffTools);
46+
await Assert.That(await DiffRunner.LaunchAsync(otherTemp, otherTarget)).IsEqualTo(LaunchResult.TooManyRunningDiffTools);
4747
}
4848

4949
/// <summary>

src/DiffEngine.Tests/PendingFilesFallbackTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public async Task ADeadPiperFallsThroughToTheQueueOwner()
4141
DiffEngineTray.IsRunning = true;
4242
Environment.SetEnvironmentVariable(ViewerClient.PortVariable, server.Port.ToString());
4343

44-
PendingFiles.AddMove("temp.txt", "target.txt", null, null, false, null);
44+
await PendingFiles.AddMoveAsync("temp.txt", "target.txt", null, null, false, null, cancel.Token);
4545
await PendingFilesAddDelete("gone.txt");
4646

4747
await Assert.That(heard).Contains(_ => _.StartsWith("Move:", StringComparison.Ordinal));

src/Directory.Build.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Project>
33
<PropertyGroup>
4-
<Version>20.0.0-beta.30</Version>
4+
<Version>20.0.0-beta.31</Version>
55
<AssemblyVersion>1.0.0</AssemblyVersion>
66
<PackageTags>Testing, Snapshot, Diff, Compare</PackageTags>
77
<Description>Launches diff tools based on file extensions. Designed to be consumed by snapshot testing libraries.</Description>

0 commit comments

Comments
 (0)