Repository navigation
Update NuGet packages and share SQL Server across integration tests - #584
Conversation
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Duplication | 0 |
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 48a3deeac9
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| { | ||
| await this.DockerHelper.StopContainersForScenarioRun(DockerServices.None); | ||
| } | ||
| public virtual ValueTask DisposeAsync() => default; |
There was a problem hiding this comment.
Delete each test database during async disposal
Each test creates a GUID-named database through EnsureCreated, but xUnit invokes this IAsyncLifetime.DisposeAsync method rather than the separate Dispose() method below, so making it a no-op leaves all 47 per-test databases in the shared SQL Server for the remainder of the run. Invoke the existing database cleanup (and dispose the client, factory, and context) here so a full suite does not continually accumulate databases and connections.
Useful? React with 👍 / 👎.
| int sqlPort = dockerHelper.GetSqlPort() | ||
| ?? throw new InvalidOperationException("SQL Server container did not expose port 1433."); | ||
|
|
||
| Instance = new IntegrationTestEnvironment(dockerHelper, sqlPort); |
There was a problem hiding this comment.
Stop the shared SQL container after the test suite
When an integration-test process finishes, this static instance remains the sole owner of the Docker helper, but no assembly-level or process-level teardown calls StopContainersForScenarioRun; the prior per-test stop was removed. The SQL Server therefore keeps running in the Docker daemon after the runner exits, and its fixed IntegrationTests scenario name can collide with a subsequent local or persistent-runner invocation, so the shared environment needs suite-level cleanup.
Useful? React with 👍 / 👎.
Summary
Testing
Not run (not requested)