mirror of
https://github.com/osukey/osukey.git
synced 2025-08-04 23:24:04 +09:00
Add more verbose logging to realm blocking process
This commit is contained in:
@ -30,7 +30,7 @@ namespace osu.Game.Tests.Database
|
||||
{
|
||||
RunTestWithRealm((realm, _) =>
|
||||
{
|
||||
using (realm.BlockAllOperations())
|
||||
using (realm.BlockAllOperations("testing"))
|
||||
{
|
||||
}
|
||||
});
|
||||
@ -56,7 +56,7 @@ namespace osu.Game.Tests.Database
|
||||
{
|
||||
Task writeTask;
|
||||
|
||||
using (realm.BlockAllOperations())
|
||||
using (realm.BlockAllOperations("testing"))
|
||||
{
|
||||
writeTask = realm.WriteAsync(r => r.Add(TestResources.CreateTestBeatmapSetInfo()));
|
||||
Thread.Sleep(100);
|
||||
@ -169,7 +169,7 @@ namespace osu.Game.Tests.Database
|
||||
|
||||
Assert.Throws<TimeoutException>(() =>
|
||||
{
|
||||
using (realm.BlockAllOperations())
|
||||
using (realm.BlockAllOperations("testing"))
|
||||
{
|
||||
}
|
||||
});
|
||||
@ -177,7 +177,7 @@ namespace osu.Game.Tests.Database
|
||||
stopThreadedUsage.Set();
|
||||
|
||||
// Ensure we can block a second time after the usage has ended.
|
||||
using (realm.BlockAllOperations())
|
||||
using (realm.BlockAllOperations("testing"))
|
||||
{
|
||||
}
|
||||
});
|
||||
|
@ -49,7 +49,7 @@ namespace osu.Game.Tests.Database
|
||||
{
|
||||
migratedStorage.DeleteDirectory(string.Empty);
|
||||
|
||||
using (realm.BlockAllOperations())
|
||||
using (realm.BlockAllOperations("testing"))
|
||||
{
|
||||
storage.Migrate(migratedStorage);
|
||||
}
|
||||
|
@ -136,7 +136,7 @@ namespace osu.Game.Tests.Database
|
||||
resolvedItems = null;
|
||||
lastChanges = null;
|
||||
|
||||
using (realm.BlockAllOperations())
|
||||
using (realm.BlockAllOperations("testing"))
|
||||
Assert.That(resolvedItems, Is.Empty);
|
||||
|
||||
realm.Write(r => r.Add(TestResources.CreateTestBeatmapSetInfo()));
|
||||
@ -154,7 +154,7 @@ namespace osu.Game.Tests.Database
|
||||
testEventsArriving(false);
|
||||
|
||||
// And make sure even after another context loss we don't get firings.
|
||||
using (realm.BlockAllOperations())
|
||||
using (realm.BlockAllOperations("testing"))
|
||||
Assert.That(resolvedItems, Is.Null);
|
||||
|
||||
realm.Write(r => r.Add(TestResources.CreateTestBeatmapSetInfo()));
|
||||
@ -212,7 +212,7 @@ namespace osu.Game.Tests.Database
|
||||
|
||||
Assert.That(beatmapSetInfo, Is.Not.Null);
|
||||
|
||||
using (realm.BlockAllOperations())
|
||||
using (realm.BlockAllOperations("testing"))
|
||||
{
|
||||
// custom disposal action fired when context lost.
|
||||
Assert.That(beatmapSetInfo, Is.Null);
|
||||
@ -226,7 +226,7 @@ namespace osu.Game.Tests.Database
|
||||
|
||||
Assert.That(beatmapSetInfo, Is.Null);
|
||||
|
||||
using (realm.BlockAllOperations())
|
||||
using (realm.BlockAllOperations("testing"))
|
||||
Assert.That(beatmapSetInfo, Is.Null);
|
||||
|
||||
realm.Run(r => r.Refresh());
|
||||
@ -251,7 +251,7 @@ namespace osu.Game.Tests.Database
|
||||
Assert.That(receivedValue, Is.Not.Null);
|
||||
receivedValue = null;
|
||||
|
||||
using (realm.BlockAllOperations())
|
||||
using (realm.BlockAllOperations("testing"))
|
||||
{
|
||||
}
|
||||
|
||||
@ -262,7 +262,7 @@ namespace osu.Game.Tests.Database
|
||||
subscription.Dispose();
|
||||
receivedValue = null;
|
||||
|
||||
using (realm.BlockAllOperations())
|
||||
using (realm.BlockAllOperations("testing"))
|
||||
Assert.That(receivedValue, Is.Null);
|
||||
|
||||
realm.Run(r => r.Refresh());
|
||||
|
Reference in New Issue
Block a user