Skip to content

Commit 4b3dd8d

Browse files
committed
timespan
1 parent ab32455 commit 4b3dd8d

2 files changed

Lines changed: 12 additions & 0 deletions

File tree

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,7 @@ If the graph is sparse, the pipeline falls back to connected components to ensur
222222
## Integration Testing Strategy
223223

224224
- **Real services only.** All graph operations run against containerised Neo4j and Apache AGE/PostgreSQL instances provisioned by Testcontainers.
225+
- **Extended startup window.** The integration fixture raises `TestcontainersSettings.WaitStrategyTimeout` to 10 minutes so first-time Docker pulls have enough time to complete before readiness checks fail.
225226
- **Deterministic heuristics.** `StubEmbeddingGenerator` guarantees stable embeddings so semantic-dedup and token-budget assertions remain reliable.
226227
- **Cross-store validation.** Shared integration fixtures verify that workflows succeed against each adapter (Cosmos tests activate when the emulator connection string is present).
227228
- **Prompt precedence.** Tests validate that manual prompt overrides win over auto-tuned variants while still cascading correctly to the default templates.

tests/ManagedCode.GraphRag.Tests/GraphRagApplicationFixture.cs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
using System.Runtime.InteropServices;
22
using DotNet.Testcontainers.Builders;
3+
using DotNet.Testcontainers.Configurations;
34
using GraphRag;
45
using GraphRag.Storage.Cosmos;
56
using GraphRag.Storage.JanusGraph;
@@ -20,6 +21,7 @@ public sealed class GraphRagApplicationFixture : IAsyncLifetime
2021
private const string Neo4jPassword = "test1234";
2122
private const string PostgresPassword = "postgres";
2223
private const string PostgresDatabase = "graphragdb";
24+
private static readonly TimeSpan ContainerStartupTimeout = TimeSpan.FromMinutes(10);
2325

2426
private ServiceProvider _serviceProvider = null!;
2527
private AsyncServiceScope? _scope;
@@ -31,6 +33,15 @@ public sealed class GraphRagApplicationFixture : IAsyncLifetime
3133
public IServiceProvider Services => _scope?.ServiceProvider ?? throw new InvalidOperationException("The fixture has not been initialized.");
3234
public string PostgresConnectionString => _postgresContainer?.GetConnectionString() ?? throw new InvalidOperationException("PostgreSQL container is not available.");
3335

36+
static GraphRagApplicationFixture()
37+
{
38+
if (TestcontainersSettings.WaitStrategyTimeout is null || TestcontainersSettings.WaitStrategyTimeout < ContainerStartupTimeout)
39+
{
40+
// Pulling these images can easily exceed the default timeout on fresh machines, so relax it globally.
41+
TestcontainersSettings.WaitStrategyTimeout = ContainerStartupTimeout;
42+
}
43+
}
44+
3445
public async Task InitializeAsync()
3546
{
3647
Uri? boltEndpoint = null;

0 commit comments

Comments
 (0)