mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 09:17:51 +08:00
Fix TestReplayExport
intermittent failure
The previous fix was not working as it was checking the path for the prefix `_`, not the filename. See https://github.com/ppy/osu/runs/17415814653#r0s2 which clearly shows this.
This commit is contained in:
parent
66824ce8ca
commit
5a0faaa0b1
@ -2,6 +2,7 @@
|
||||
// See the LICENCE file in the repository root for full licence text.
|
||||
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using NUnit.Framework;
|
||||
using osu.Framework.Allocation;
|
||||
@ -173,7 +174,7 @@ namespace osu.Game.Tests.Visual.Gameplay
|
||||
string? filePath = null;
|
||||
|
||||
// Files starting with _ are temporary, created by CreateFileSafely call.
|
||||
AddUntilStep("wait for export file", () => filePath = LocalStorage.GetFiles("exports").SingleOrDefault(f => !f.StartsWith("_", StringComparison.Ordinal)), () => Is.Not.Null);
|
||||
AddUntilStep("wait for export file", () => filePath = LocalStorage.GetFiles("exports").SingleOrDefault(f => !Path.GetFileName(f).StartsWith("_", StringComparison.Ordinal)), () => Is.Not.Null);
|
||||
AddAssert("filesize is non-zero", () =>
|
||||
{
|
||||
using (var stream = LocalStorage.GetStream(filePath))
|
||||
|
Loading…
Reference in New Issue
Block a user