This PR has a large blast radius because it takes the final step and bumps up the Controller to be fully async.
We have historically done a piece-by-piece update, so all operations were already async but the controller interface was kept synchronous.
With this update, the controller is now fully async and all tests are updated.
Most places where the new C# compiler warns about function names not ending in `Async` were also adressed, giving a massive refactor change.
Functionally, no changes are done.
This adds a number of additional features to the repair process so it can actually fully recover if all data is present.
Also added a several tests to ensure that the functionality works in multiple scenarios.
This fixes#5987
There are occasionally times where the difference is greater than 500ms.
1) Failed : Duplicati.UnitTest.BorderTests.Run100k
Restore, creation time mismatch for /Users/runner/duplicati_testdata/backup-data/c-m2 and /Users/runner/duplicati_testdata/restored/c-m2
Expected: 2021-02-08 18:39:04.9202665 +/- 00:00:00.5000000
But was: 2021-02-08 18:39:05.572262
at Duplicati.UnitTest.TestUtils.AssertFilesAreEqual (System.String
expectedFile, System.String actualFile, System.Boolean verifymetadata,
System.String contextMessage) [0x0016f] in
/Users/runner/work/duplicati/duplicati/Duplicati/UnitTest/TestUtils.cs:256
There are occasionally times where the difference is greater than 200ms.
1) Failed : Duplicati.UnitTest.BorderTests.Run100k
Restore, creation time mismatch for /Users/runner/duplicati_testdata/backup-data/b-p500 and /Users/runner/duplicati_testdata/restored/b-p500
Expected: 2021-02-08 00:34:08.0221856 +/- 00:00:00.2500000
But was: 2021-02-08 00:34:08.296859
at Duplicati.UnitTest.TestUtils.AssertFilesAreEqual (System.String
expectedFile, System.String actualFile, System.Boolean verifymetadata,
System.String contextMessage) [0x0016f] in
/Users/runner/work/duplicati/duplicati/Duplicati/UnitTest/TestUtils.cs:256
Replace `VerifyDir` and `CompareFiles` with
`AssertDirectoryTreesAreEquivalent` and `AssertFilesAreEqual`.
Move `WriteFile` to `TestUtils`.
Add "Symlink" category to start.sh.