mirror of
https://github.com/osukey/osukey.git
synced 2025-05-03 20:57:28 +09:00
Add timeout for all ManualResetEventSlim.Wait
invocations
Timeout values were taken as best-guesses of upper values we'd expect from sane execution.
This commit is contained in:
parent
ed9c55a776
commit
7ef8b7df5f
@ -76,7 +76,7 @@ namespace osu.Game.Benchmarks
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
done.Wait();
|
done.Wait(60000);
|
||||||
}
|
}
|
||||||
|
|
||||||
[Benchmark]
|
[Benchmark]
|
||||||
@ -115,7 +115,7 @@ namespace osu.Game.Benchmarks
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
done.Wait();
|
done.Wait(60000);
|
||||||
}
|
}
|
||||||
|
|
||||||
[Benchmark]
|
[Benchmark]
|
||||||
|
@ -79,11 +79,11 @@ namespace osu.Game.Tests.Database
|
|||||||
{
|
{
|
||||||
hasThreadedUsage.Set();
|
hasThreadedUsage.Set();
|
||||||
|
|
||||||
stopThreadedUsage.Wait();
|
stopThreadedUsage.Wait(60000);
|
||||||
});
|
});
|
||||||
}, TaskCreationOptions.LongRunning | TaskCreationOptions.HideScheduler);
|
}, TaskCreationOptions.LongRunning | TaskCreationOptions.HideScheduler);
|
||||||
|
|
||||||
hasThreadedUsage.Wait();
|
hasThreadedUsage.Wait(60000);
|
||||||
|
|
||||||
Assert.Throws<TimeoutException>(() =>
|
Assert.Throws<TimeoutException>(() =>
|
||||||
{
|
{
|
||||||
|
@ -46,7 +46,7 @@ namespace osu.Game.Tests.Visual.Multiplayer
|
|||||||
{
|
{
|
||||||
Task.Run(() =>
|
Task.Run(() =>
|
||||||
{
|
{
|
||||||
allowResponseCallback.Wait();
|
allowResponseCallback.Wait(10000);
|
||||||
allowResponseCallback.Reset();
|
allowResponseCallback.Reset();
|
||||||
Schedule(() => d?.Invoke("Incorrect password"));
|
Schedule(() => d?.Invoke("Incorrect password"));
|
||||||
});
|
});
|
||||||
|
@ -209,6 +209,6 @@ namespace osu.Game.Database
|
|||||||
|
|
||||||
public void SetMigrationCompletion() => migrationComplete.Set();
|
public void SetMigrationCompletion() => migrationComplete.Set();
|
||||||
|
|
||||||
public void WaitForMigrationCompletion() => migrationComplete.Wait();
|
public void WaitForMigrationCompletion() => migrationComplete.Wait(300000);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -103,7 +103,7 @@ namespace osu.Game.Graphics
|
|||||||
framesWaitedEvent.Set();
|
framesWaitedEvent.Set();
|
||||||
}, 10, true);
|
}, 10, true);
|
||||||
|
|
||||||
framesWaitedEvent.Wait();
|
framesWaitedEvent.Wait(1000);
|
||||||
waitDelegate.Cancel();
|
waitDelegate.Cancel();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -451,7 +451,8 @@ namespace osu.Game
|
|||||||
readyToRun.Set();
|
readyToRun.Set();
|
||||||
}, false);
|
}, false);
|
||||||
|
|
||||||
readyToRun.Wait();
|
if (!readyToRun.Wait(30000))
|
||||||
|
throw new TimeoutException("Attempting to block for migration took too long.");
|
||||||
|
|
||||||
bool? cleanupSucceded = (Storage as OsuStorage)?.Migrate(Host.GetStorage(path));
|
bool? cleanupSucceded = (Storage as OsuStorage)?.Migrate(Host.GetStorage(path));
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user