Commit Graph

135 Commits

Author SHA1 Message Date
56d7d81465 Fix broken test due to SynchronizationContext never running expected work 2022-01-25 14:47:21 +09:00
bfa521bdd2 Merge pull request #16593 from peppy/realm-clean-up
Clean up realm naming
2022-01-25 14:33:53 +09:00
8116806db3 Add test coverage of calling BlockAllOperations a second time after timeout 2022-01-25 14:00:58 +09:00
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
d7342880f5 Update remaining cases of clashes with realm.Write and realm.RegisterForNotifications 2022-01-25 13:09:48 +09:00
e23b10e6a5 Update remaining cases of clashing variable name in realm.Run(realm.. 2022-01-25 13:04:05 +09:00
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
6eb2c28e41 Rename RealmContextFactory to RealmAccess 2022-01-24 20:38:07 +09:00
40aa873190 Rename register methods to better explain their purpose 2022-01-24 14:37:36 +09:00
0709a2ac9b Add test coverage of realm subscription scenarios 2022-01-23 20:28:13 +09:00
6a076a684e Merge branch 'realm-context-use-update-when-feasible' into realm-stable-subscriptions 2022-01-22 13:14:25 +09:00
c9db0181d0 Attempt to fix test failures on windows due to context being held open 2022-01-22 12:24:05 +09:00
1f157d729d Update existing subscriptions to new style
Fix missing detach calls in `MusicController`
2022-01-21 20:05:03 +09:00
114c9e8c1f Update all usages of CreateContext to use either Run or Write 2022-01-21 17:27:08 +09:00
70cc03fe43 Avoid constructor overhead for realm RealmKeyBinding parameterless constructor 2022-01-20 17:29:07 +09:00
1db2135d70 Update tests to match new behaviour 2022-01-19 01:05:47 +09:00
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
a307f7e90e Add test coverage of updating via copying changes from detached instance 2022-01-12 17:49:11 +09:00
c92aff8d2b Add test of cyclic beatmap/beatmapset references 2022-01-12 17:49:11 +09:00
509301d94f Update detach test to assert correct behaviour 2022-01-12 17:49:11 +09:00
8461eaab46 BeatmapSetInfo detach support 2022-01-12 17:00:16 +09:00
31a3161189 Make tests compile again 2022-01-12 17:00:16 +09:00
00e3af3366 Update model manager and many related classes to get things compiling again 2022-01-12 17:00:00 +09:00
b8cd3cdbbc Various updates to ruleset and primary key usages to move closer to realm support 2022-01-12 16:57:13 +09:00
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
618903c217 Rename realm to become imposter classes 2022-01-12 16:39:36 +09:00
031a40af6a Replace usages of Wait with WaitSafely 2022-01-04 11:51:41 +09:00
4b88e257e5 Update usages of CleanRunHeadlessGameHost to match new signature 2021-12-24 20:17:34 +09:00
441b7baa93 Provide a realm factory to usages of ToLive/RealmLive 2021-12-14 14:26:34 +09:00
be337b4ace Add failing test coverage of RealmLive failing post storage migration 2021-12-14 13:53:23 +09:00
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
4cac87e933 Add test coverage showing that KeyBindingStore won't remove excess key bindings 2021-12-13 15:26:32 +09:00
dbb08f7d46 Use OnlineID for set operations 2021-12-10 16:11:48 +09:00
16fd7f5a28 Simplify slightly redundant assertions 2021-12-04 14:42:01 +01:00
675ecb603f Add IRulesetStore to allow for transitional usage in upcoming manager classes 2021-12-03 17:57:40 +09:00
4306420922 Add extension methods to add extra safety to realm subscriptions
Also adjusts the naming and documentation to make it (hopefully) easier
to understand what this method/process implies.
2021-12-01 15:09:53 +09:00
8fdb9ab4e5 Merge branch 'master' into realm-integration/live-queryable-fix 2021-11-30 18:54:14 +09:00
daa7135381 Merge branch 'master' into realm-nested-context-creation-deadlock-fix 2021-11-30 18:01:00 +09:00
0feec09966 Refactor beatmap importer tests to ensure realm is refreshed when waiting on state 2021-11-30 14:12:49 +09:00
6b0999052f Merge branch 'master' into realm-integration/live-queryable-fix 2021-11-30 12:02:37 +09:00
2e31f5a338 Update tests to match new behaviour 2021-11-30 11:55:13 +09:00
431ac1d97b Remove unused using directive 2021-11-29 20:57:55 +01:00
8a188b74b1 Merge pull request #15850 from peppy/realm-integration/misc-qol
Apply a couple of realm related documentation/interface changes
2021-11-29 18:58:15 +09:00
566e10f8cc Refactor test to be easier to follow 2021-11-29 18:55:23 +09:00
bac7966337 Update RealmLiveTests to use interface type 2021-11-29 18:17:30 +09:00
071a8c6709 Add test coverage showing RealmLive failure after an attach 2021-11-29 17:34:58 +09:00
54798eabc9 Add test coverage of potential deeadlock scenario with nested realm context fetching 2021-11-29 16:29:53 +09:00
791f7e3801 Update RealmLive tests in line with modified behaviour 2021-11-29 15:16:16 +09:00
d73e81ee63 Add test coverage of non-optimised existing model check 2021-11-29 14:48:28 +09:00
5e53f51c99 Merge pull request #15812 from peppy/realm-live-unmanaged-fetch-fix
Avoid attempting to fetch a non-managed `RealmLive` instance from the realm backing
2021-11-26 15:37:58 +09:00