mirror of
https://github.com/BinaryAlley/Nemera.git
synced 2026-12-03 08:11:10 +00:00
Updates the provider configuration and ownership tests
Covers the provider and reader choices saved with a library, the reconciliation and stale configuration deletion in the provider store, the library type lookups, the ownership and permission checks for update and delete, and the validator behavior for enum names.
This commit is contained in:
1 parent
48ad8692af
commit
64e5163229
127 files changed
+5541
-5296
No files matched your search
+4
-1
@@ -84,10 +84,13 @@ public class MediaLibraryScanProcessorJobTests : IDisposable
|
||||
RegisterScan(firstScanId, LibraryScanJobStatus.Pending);
|
||||
RegisterScan(secondScanId, LibraryScanJobStatus.Pending);
|
||||
TaskCompletionSource<bool> releaseFirstScan = new(TaskCreationOptions.RunContinuationsAsynchronously);
|
||||
// ExecutionStarted is signaled before the callback runs, and resumes the test on another thread, so the test waits for the callback itself to record the scan
|
||||
TaskCompletionSource firstScanRecorded = new(TaskCreationOptions.RunContinuationsAsynchronously);
|
||||
List<Guid> startedScanIds = [];
|
||||
FakeMediaLibraryScanDiscoveryJob firstRootJob = _mediaLibraryScanDiscoveryJobFixture.Create(onExecute: async _ =>
|
||||
{
|
||||
startedScanIds.Add(firstScanId.ScanId.Value);
|
||||
firstScanRecorded.SetResult();
|
||||
await releaseFirstScan.Task;
|
||||
});
|
||||
FakeMediaLibraryScanDiscoveryJob secondRootJob = _mediaLibraryScanDiscoveryJobFixture.Create(onExecute: _ =>
|
||||
@@ -102,7 +105,7 @@ public class MediaLibraryScanProcessorJobTests : IDisposable
|
||||
// Act
|
||||
_queue.Writer.TryWrite(firstScanId);
|
||||
_queue.Writer.TryWrite(secondScanId);
|
||||
await firstRootJob.ExecutionStarted.WaitAsync(s_testTimeout);
|
||||
await firstScanRecorded.Task.WaitAsync(s_testTimeout);
|
||||
|
||||
// Assert
|
||||
// The second scan must not start while the job graph of the first one is still executing.
|
||||
|
||||
Reference in new issue
Block a user