Dean Herbert
975883da5c
Move all usages of client.realm
filename to a single const
2022-03-30 13:34:48 +09:00
Dean Herbert
4d0b4c2541
Fix realm potentially not being refreshed in time for test asserts in BeatmapImporterTests
...
As seen at https://github.com/ppy/osu/runs/5659368512?check_suite_focus=true
Went through every usage of `.Import` and added either an
`EnsureLoaded`, or where that provides too many checks, an explicit
`realm.Refresh()`.
2022-03-24 12:59:17 +09:00
Dean Herbert
0fcb3bdba9
Fix beatmap date added not being updated on reimporting a soft deleted beatmap
...
Addresses concerns raised in https://github.com/ppy/osu/discussions/17399 .
2022-03-22 14:10:36 +09:00
Dean Herbert
2a55c5e02e
Add extension method to detect and isolate realm collection-level changes
2022-03-08 14:50:47 +09:00
Dean Herbert
1485a3a28a
Add test coverage of proeprty changed subscriptions
2022-03-03 17:56:49 +09:00
Dean Herbert
9a117467b5
Add RealmAccess.WriteAsync
method
2022-03-01 18:44:05 +09:00
Dean Herbert
0138f22c8d
Update existing usages to point to RealmRulesetStore
2022-02-16 17:13:54 +09:00
Dean Herbert
714177cce1
Remove pointless constructor in RulesetInfo
2022-01-27 15:37:27 +09:00
Dean Herbert
abe2cccaae
Fix completely invalid method of testing realm migration
2022-01-26 19:03:26 +09:00
Dean Herbert
91e0d1021f
Merge branch 'master' into fix-out-of-order-events-on-block-fail
2022-01-26 15:21:10 +09:00
Dean Herbert
cd71ec0edd
Remove ILive<>
interface (and use abstract Live<>
instead)
2022-01-26 13:38:56 +09:00
Dean Herbert
ffd7877a1e
Remove synchronization context hacks in realm tests
2022-01-25 17:41:22 +09:00
Dan Balasescu
d8270fe14f
Merge pull request #16604 from peppy/less-async-import
...
Remove `Task` from the inner-most `Import` method in `RealmArchiveModelImporter`
2022-01-25 16:47:07 +09:00
Dean Herbert
778d2a71b4
Remove Task
from the inner-most Import
method in RealmArchiveModelImporter
...
One of my pending work items for post-realm merge.
The lowest-level import task is no longer asynchronous, as we don't want
it to span multiple threads to allow easier interaction with realm.
Removing the `Task` spec simplifies a heap of usages.
Individual usages should decide whether they want to run the import
asynchronously, by either using an alternative override or spooling up a
thread themselves.
2022-01-25 15:30:29 +09:00
Dean Herbert
ae0fea8e26
Fix compilation issues due to misnamed fild
2022-01-25 15:29:45 +09:00
Dean Herbert
35e1c7de7d
Merge branch 'master' into realm-block-timeout-assert-failure
2022-01-25 15:05:11 +09:00
Dean Herbert
bda77fb6b3
Merge branch 'master' into realm-block-timeout-assert-failure
2022-01-25 14:47:34 +09:00
Dean Herbert
56d7d81465
Fix broken test due to SynchronizationContext
never running expected work
2022-01-25 14:47:21 +09:00
Dan Balasescu
bfa521bdd2
Merge pull request #16593 from peppy/realm-clean-up
...
Clean up realm naming
2022-01-25 14:33:53 +09:00
Dean Herbert
8116806db3
Add test coverage of calling BlockAllOperations
a second time after timeout
2022-01-25 14:00:58 +09:00
Dean Herbert
bbcc149e2e
During import if files are found to be missing, ensure they are restored
...
This is one step closer to sanity in terms of physical files. As per the
comment I have left in place, we really should be checking file sizes or
hashes, but to keep things simple and fast I've opted to just cover the
"missing file" scenario for now.
Ran into this when testing against a foreign `client.realm` by:
- Noticing a beatmap doesn't load
- Deleting said beatmap
- Downloading via beatmap overlay
- Beatmap is restored but still doesn't work
Note that I've kept the logic where this will undelete an existing
import rather than create one from fresh, as I think that is beneficial
to the user (ie. it will still keep any linked scores on restore).
2022-01-25 13:44:54 +09:00
Dean Herbert
d7342880f5
Update remaining cases of clashes with realm.Write
and realm.RegisterForNotifications
2022-01-25 13:09:48 +09:00
Dean Herbert
e23b10e6a5
Update remaining cases of clashing variable name in realm.Run(realm..
2022-01-25 13:04:05 +09:00
Dean Herbert
f30894840c
Update terminology to realm "instance" rather than "context"
...
This matches the terminology used by realm themselves, which feels
better.
2022-01-24 20:38:38 +09:00
Dean Herbert
6eb2c28e41
Rename RealmContextFactory
to RealmAccess
2022-01-24 20:38:07 +09:00
Dean Herbert
40aa873190
Rename register methods to better explain their purpose
2022-01-24 14:37:36 +09:00
Dean Herbert
0709a2ac9b
Add test coverage of realm subscription scenarios
2022-01-23 20:28:13 +09:00
Dean Herbert
6a076a684e
Merge branch 'realm-context-use-update-when-feasible' into realm-stable-subscriptions
2022-01-22 13:14:25 +09:00
Dean Herbert
c9db0181d0
Attempt to fix test failures on windows due to context being held open
2022-01-22 12:24:05 +09:00
Dean Herbert
1f157d729d
Update existing subscriptions to new style
...
Fix missing detach calls in `MusicController`
2022-01-21 20:05:03 +09:00
Dean Herbert
114c9e8c1f
Update all usages of CreateContext
to use either Run
or Write
2022-01-21 17:27:08 +09:00
Dean Herbert
70cc03fe43
Avoid constructor overhead for realm RealmKeyBinding
parameterless constructor
2022-01-20 17:29:07 +09:00
Dean Herbert
1db2135d70
Update tests to match new behaviour
2022-01-19 01:05:47 +09:00
Dean Herbert
f24b2b1be3
Make copying detached changes to realm only exposed for BeatmapSet
...
Also fixes remaining issues with the copy process.
2022-01-12 17:49:11 +09:00
Dean Herbert
a307f7e90e
Add test coverage of updating via copying changes from detached instance
2022-01-12 17:49:11 +09:00
Dean Herbert
c92aff8d2b
Add test of cyclic beatmap/beatmapset references
2022-01-12 17:49:11 +09:00
Dean Herbert
509301d94f
Update detach test to assert correct behaviour
2022-01-12 17:49:11 +09:00
Dean Herbert
8461eaab46
BeatmapSetInfo
detach support
2022-01-12 17:00:16 +09:00
Dean Herbert
31a3161189
Make tests compile again
2022-01-12 17:00:16 +09:00
Dean Herbert
00e3af3366
Update model manager and many related classes to get things compiling again
2022-01-12 17:00:00 +09:00
Dean Herbert
b8cd3cdbbc
Various updates to ruleset and primary key usages to move closer to realm support
2022-01-12 16:57:13 +09:00
Dean Herbert
3ecd889fef
Replace EF RulesetStore
with realm version
...
Pass full EF context factory to `RealmContextFactory` for migration purposes
2022-01-12 16:39:36 +09:00
Dean Herbert
618903c217
Rename realm to become imposter classes
2022-01-12 16:39:36 +09:00
Dean Herbert
031a40af6a
Replace usages of Wait
with WaitSafely
2022-01-04 11:51:41 +09:00
Dean Herbert
4b88e257e5
Update usages of CleanRunHeadlessGameHost
to match new signature
2021-12-24 20:17:34 +09:00
Dean Herbert
441b7baa93
Provide a realm factory to usages of ToLive
/RealmLive
2021-12-14 14:26:34 +09:00
Dean Herbert
be337b4ace
Add failing test coverage of RealmLive
failing post storage migration
2021-12-14 13:53:23 +09:00
Dean Herbert
8e6c7eb030
Use OsuStorage
in realm tests to allow for migration
...
Also changes the realm filename to use `client` to match the ignore
rules in `OsuStorage`. Without doing this, migration will fail in an
indefinite mutex wait when attempting to delete the realm `.note` file.
2021-12-14 13:52:28 +09:00
Dean Herbert
4cac87e933
Add test coverage showing that KeyBindingStore
won't remove excess key bindings
2021-12-13 15:26:32 +09:00
Dean Herbert
dbb08f7d46
Use OnlineID
for set operations
2021-12-10 16:11:48 +09:00