feat(launcher): stabilize prepared content updates
This commit is contained in:
parent
f160f3fee1
commit
af9327a17b
42 changed files with 3706 additions and 147 deletions
|
|
@ -67,6 +67,21 @@ public sealed class PreparedAssetVerificationCacheTests : IDisposable
|
|||
Assert.Equal(1, _hashCount);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public async Task CacheMissReportsTheExceptionalLongReadBeforeHashing()
|
||||
{
|
||||
LauncherInstallRecordStore store = await CreateInstalledStoreAsync();
|
||||
var statuses = new List<string>();
|
||||
|
||||
Assert.True((await store.LoadAndVerifyAsync(
|
||||
progress: new ImmediateProgress(statuses.Add))).IsVerified);
|
||||
|
||||
Assert.Contains(
|
||||
statuses,
|
||||
status => status.Contains("whole world-data pak", StringComparison.Ordinal)
|
||||
&& status.Contains("30 seconds", StringComparison.Ordinal));
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public async Task ForcedFullVerificationHashesEvenWithAValidCache()
|
||||
{
|
||||
|
|
@ -264,4 +279,9 @@ public sealed class PreparedAssetVerificationCacheTests : IDisposable
|
|||
LauncherInstallRecordStore.CurrentBakeToolVersion));
|
||||
return store;
|
||||
}
|
||||
|
||||
private sealed class ImmediateProgress(Action<string> report) : IProgress<string>
|
||||
{
|
||||
public void Report(string value) => report(value);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue