Skip to content

Commit

Permalink
add test verifying that awaiting migration can't start after the migr…
Browse files Browse the repository at this point in the history
…ation service is shutdown
  • Loading branch information
hahn-kev committed Oct 20, 2023
1 parent afaa925 commit 5ddbd5e
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions backend/Testing/LexCore/Services/RepoMigrationTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -259,4 +259,12 @@ public async Task ShutdownServiceShouldCancelAnyMigrationFinishedTasks()
await migrationP1Task.ShouldThrowAsync<OperationCanceledException>();
await migrationP2Task.ShouldThrowAsync<OperationCanceledException>();
}

[Fact]
public async Task CantWaitMigrationWhenServiceIsShuttingDown()
{
await StartMigrationService();
await _repoMigrationService.StopAsync(Timeout());
await _repoMigrationService.WaitMigrationFinishedAsync("p1", Timeout()).ShouldThrowAsync<InvalidOperationException>();
}
}

0 comments on commit 5ddbd5e

Please sign in to comment.