Prepare strategies before the host is ready; stop demo servers first (refs #44 #45)
ci / test (postgres) (push) Successful in 4m39s
ci / test (sqlite) (push) Successful in 2m57s
ci / image (push) Successful in 56s
ci / test (postgres) (pull_request) Successful in 5m27s
ci / test (sqlite) (pull_request) Successful in 3m14s
ci / image (pull_request) Successful in 10s
ci / test (postgres) (push) Successful in 4m39s
ci / test (sqlite) (push) Successful in 2m57s
ci / image (push) Successful in 56s
ci / test (postgres) (pull_request) Successful in 5m27s
ci / test (sqlite) (pull_request) Successful in 3m14s
ci / image (pull_request) Successful in 10s
Loading the outcomes before "ready" was not enough: on a fresh database the strategy rows did not exist yet, so the load did nothing and CI run 220 failed the same way on PostgreSQL. The new TradingService.PrepareAsync creates accounts and strategies, then loads the outcomes; the host runs it before it is ready and logs a failure without blocking the interface. StartAsync repeats it, which changes nothing. The demo tests deleted the demo folder while the server still held its SQLite file, which Windows refuses at random. They now stop the server first. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
dc1ba4e701
commit
fc5df0146e
5 files changed
+74
-41
No files matched your search
@@ -17,7 +17,7 @@ public sealed class StrategyScreensTests
|
||||
[TestCategory(Category.Integration)]
|
||||
public async Task TheDemoShowsTradesStrategiesAndRiskAsInTheMockups()
|
||||
{
|
||||
await using var server = await ServerHarness.StartAsync("docker", ServerHarness.DockerSqlite(), extraArgs: ["--demo"]);
|
||||
var server = await ServerHarness.StartAsync("docker", ServerHarness.DockerSqlite(), extraArgs: ["--demo"]);
|
||||
var demoRoot = server.Host.Config.Data.Root;
|
||||
try
|
||||
{
|
||||
@@ -63,6 +63,8 @@ public sealed class StrategyScreensTests
|
||||
}
|
||||
finally
|
||||
{
|
||||
// The server first: on Windows a database still open cannot be deleted.
|
||||
await server.DisposeAsync();
|
||||
TempFolder.Delete(demoRoot);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user