Commit Graph

49 Commits

Author SHA1 Message Date
545c04aaf5 Fix dangerous File.Copy causing intermittent realm migration test failures
Resolves an issue I've been able to locally reproduce on windows.
Basically, the `File.Copy` would begin while realm was blocking. The
"restore" operation is posted to the `SynchronizationContext` to run on
next update call, but in the mean time the copy would begin, causing a
conflict of interest.

Very dangerous. Only really noticeable on windows.
2022-06-24 16:18:56 +09:00
f8830c6850 Automated #nullable processing 2022-06-17 16:37:17 +09:00
975883da5c Move all usages of client.realm filename to a single const 2022-03-30 13:34:48 +09:00
f762af1344 Add test coverage of migrating to folder with existing data 2022-03-29 23:28:07 +09:00
2d34831b5f Fix TestMigration failing due to changes in realm migration logic
Fixes failures as seen at https://github.com/ppy/osu/runs/4927916031?check_suite_focus=true.
2022-01-25 12:54:40 +09:00
bf4133021b Update migration test to use realm file as test 2022-01-12 17:49:11 +09:00
1c0dc204c4 Fix some regressing behaviour due to CleanRunHeadlessGameHost's naming structure changing 2021-12-24 20:24:37 +09:00
4b88e257e5 Update usages of CleanRunHeadlessGameHost to match new signature 2021-12-24 20:17:34 +09:00
4a3a5054fd Ensure CustomDataDirectoryTest methods use a fresh directory to avoid IO errors
Resolves test failures like https://github.com/ppy/osu/runs/4592088736?check_suite_focus=true.
2021-12-21 18:42:39 +09:00
6944151486 Apply batch fixing of built-in types using var 2021-10-27 13:04:41 +09:00
5e234fb746 Add try catch to avoid test failures on windows 2021-08-20 22:07:13 +09:00
dc44cc0eb3 Update scenarios to use new TestRunHeadlessGameHost where feasible 2021-08-18 16:01:56 +09:00
887035c12e Fix migration target having left over files potentially causing test failures
As seen at
https://github.com/ppy/osu/pull/13831/checks?check_run_id=3025050324.
2021-07-09 12:21:25 +09:00
2c1422b4f9 Add comment regarding teste edge case 2021-04-26 15:37:19 +09:00
03592fa696 Merge branch 'master' into realm-migration-operation-blocking 2021-03-19 21:33:26 +09:00
7fa5fd5647 Update usages of config with framework changes 2021-03-17 16:10:16 +09:00
d480aa0e42 Don't check for all ignored files being present in original folder (the realm exception is platform dependent) 2021-01-21 22:57:55 +09:00
1989141968 Merge branch 'master' into tourney-asset-refactor 2020-10-07 21:34:07 +09:00
3cef93ee27 Centralise import test helper methods 2020-09-18 18:05:33 +09:00
89a2f20922 Use new CleanRun host class in import tests 2020-09-17 16:12:30 +09:00
835c8d74b7 Wait for two update frames before attempting to migrate storage 2020-09-17 16:12:18 +09:00
c167727ac6 Merge branch 'master' into tourney-asset-refactor
# Conflicts:
#	osu.Game/IO/OsuStorage.cs
2020-08-09 12:38:41 +02:00
3a5784c410 Ensure directories are deleted before migration tests run 2020-07-09 15:08:15 +09:00
1edfac4923 Fix test failing 2020-07-01 23:21:08 +09:00
47a732ef60 Address review comments
Now asserting instead of an if-statement, change cast from OsuStorage to MigratableStorage and make internal virtual properties protected.
2020-06-24 23:01:56 +02:00
063503f4db Move null check outside of the loop 2020-06-24 20:43:56 +02:00
af11340849 Fix nullref exceptions and redundant explicit type 2020-06-24 02:13:28 +02:00
c32ef5e718 Address formatting issues 2020-06-24 00:37:29 +02:00
a47d34f1db make ignore properties protected virtual get-only in base 2020-06-23 23:34:26 +02:00
21774b8967 Move static properties to parent class and inherit OsuStorage from it 2020-06-22 11:38:50 +02:00
1d4d749b53 Undo blank line removal
Was too excited to add blank lines before submitting the PR that I overdid it
2020-06-11 15:56:34 +02:00
222ac86304 Add newlines at the end of the file 2020-06-11 15:52:14 +02:00
2c6887e610 Remove unnecessary use of and remove StartupStorage 2020-05-31 19:49:03 +03:00
82fe99cf4a Replace any potential usage of Environment.CurrentDirectory with a new RuntimeInfo.StartupDirectory
Using `Environment.CurrentDirectory` for storing / reading files is dangerous as the current directory is mutable and can be changed when performing a certain operation (like opening solutions in roslyn type reference builder for example).
2020-05-31 02:24:49 +03:00
aea192080a Fix incorrect storage name 2020-05-15 13:02:46 +09:00
7641507c90 Ensure test directories are deleted before subsequent run 2020-05-15 10:45:57 +09:00
0690d81bbb Add protection against migrating to a nested folder 2020-05-15 10:40:26 +09:00
19f117ae53 Update test logic for new exception type 2020-05-15 10:28:03 +09:00
827d75b152 Revert "Add protection against migrating to a nested folder"
This reverts commit ef8375b442.
2020-05-14 22:44:27 +09:00
ef8375b442 Add protection against migrating to a nested folder 2020-05-14 22:42:42 +09:00
e4a23b3e7d Fix ignored excluding more than top level 2020-05-12 12:39:04 +09:00
6c350db097 Add connection flushing support 2020-05-11 21:39:44 +09:00
36640f5dda Merge branch 'master' into migration-backend 2020-05-11 18:52:36 +09:00
384862d48b Fix incorrect relative paths when using GetStorageForDirectory 2020-05-10 13:20:13 +09:00
5dda94187e Add more edge case testing 2020-05-09 20:13:44 +09:00
5e65bda8d8 Add test coverage 2020-05-07 22:12:24 +09:00
4ac5ed71f4 Remove redundant string interpolation 2020-05-07 21:48:57 +09:00
90e17853a8 Update tests in line with framework changes 2020-05-07 18:12:11 +09:00
6621d363da Add basic custom data directory support 2020-05-04 17:01:05 +09:00