Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Nov 17, 2025

Summary

Integration specs can now run against both in-process and out-of-process Chronicle setups. Specs are centralized in a shared folder and automatically discovered by the build pipeline.

Added

  • Integration/Specifications folder containing all shared integration test specifications
  • Integration/DotNET project for out-of-process testing using Chronicle container
  • Dynamic namespace discovery in build pipeline that reads folder structure
  • Matrix strategy in dotnet-build.yml to run tests across both projects and all discovered namespaces

Changed

  • Moved all spec folders (AggregateRoots, Projections, for_EventSequence, for_JobsManager, for_Reactors, for_Reducers) from DotNET.InProcess to Specifications
  • Updated spec namespaces from Cratis.Chronicle.InProcess.Integration to Cratis.Chronicle.Integration.Specifications
  • DotNET.InProcess now includes specs via <Compile Include="../Specifications/**/*.cs">
  • Spec context classes use ChronicleFixture type alias that resolves to different concrete fixture types per project via GlobalUsings
  • Build pipeline discovers test namespaces dynamically instead of hardcoded list

Implementation pattern:

// Integration/DotNET.InProcess/GlobalUsings.cs
global using ChronicleFixture = Cratis.Chronicle.XUnit.Integration.ChronicleInProcessFixture;

// Integration/DotNET/GlobalUsings.cs  
global using ChronicleFixture = Cratis.Chronicle.Integration.ChronicleOutOfProcessFixtureWithLocalImage;

// Shared spec in Integration/Specifications/
public class context(ChronicleFixture fixture) : Specification<ChronicleFixture>(fixture)
{
    // Works with both fixture types
}

Note: Some specs using in-process-only features (direct grain access, internal APIs) will only compile/run in DotNET.InProcess. This is expected.

Original prompt

This section details on the original issue you should resolve

<issue_title>Enable running integration specs for different setups</issue_title>
<issue_description>Today we have the integration specs in Integration/DotNET.InProcess that runs with a MongoDB setup with the Kernel in process.
We want to reuse the specs but just run them for different types of environments and setups. With this we also want to improve the build pipelines for this.

Tasks:

  • Create a folder within the Integration folder at the root of the repository calledSpecifications
  • Move all the actual specs into this new Specifications folder
  • Update DotNET.InProcess project to include all the files as <Compile/> from the Specifications folder
  • Add a new project called DotNET and set it up to be not in process by leveraging a container, in the same way we've done it for the Api integration specs.
  • Fix the build pipeline (botnet-build.yml - integration-specs) to be dynamic with regards to the namespace matrix, it should use the top level folders from the new Specifications as namespaces.
  • Add a second dimension to the matrix with running multiple projects (DotNET.InProcess, DotNET) - we will expand with more later</issue_description>

Comments on the Issue (you are @copilot in this section)


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 2 commits November 17, 2025 07:32
- Created Integration/Specifications folder
- Moved all spec folders from DotNET.InProcess to Specifications
- Updated spec namespaces from InProcess.Integration to Integration.Specifications
- Made specs fixture-agnostic by using IChronicleFixture interface
- Updated DotNET.InProcess project to include specs from Specifications folder
- Created new Integration/DotNET project for out-of-process testing
- Added support files for both projects (ChronicleCollection, Specification, etc.)

Co-authored-by: einari <[email protected]>
- Updated dotnet-build.yml to dynamically discover namespaces from Specifications folder
- Added matrix dimension for both DotNET.InProcess and DotNET projects
- Used type aliases (ChronicleFixture) in GlobalUsings to make specs work with both fixture types
- Fixed all spec files to use ChronicleFixture alias instead of concrete types
- DotNET.InProcess project builds successfully
- DotNET project has expected build errors for in-process-only specs

Co-authored-by: einari <[email protected]>
Copilot AI changed the title [WIP] Enable running integration specs for different setups Enable running integration specs across multiple test environments Nov 17, 2025
Copilot AI requested a review from einari November 17, 2025 07:46
Copilot finished work on behalf of einari November 17, 2025 07:46
@github-actions
Copy link
Contributor

Docker Image for this PR:
https://ghcr.io/cratis/chronicle:14.10.3-pr2269.30a1af2

docker run ghcr.io/cratis/chronicle:14.10.3-pr2269.30a1af2

@github-actions
Copy link
Contributor

NuGet packages for this PR, e.g. Chronicle:
https://github.com/Cratis/Chronicle/pkgs/nuget/Cratis.Chronicle

Use version: 14.10.3-pr2269.30a1af2

@github-actions
Copy link
Contributor

Docker Image for this PR:
https://ghcr.io/cratis/chronicle:14.10.3-pr2269.7acaf2a

docker run ghcr.io/cratis/chronicle:14.10.3-pr2269.7acaf2a

@github-actions
Copy link
Contributor

NuGet packages for this PR, e.g. Chronicle:
https://github.com/Cratis/Chronicle/pkgs/nuget/Cratis.Chronicle

Use version: 14.10.3-pr2269.7acaf2a

@github-actions
Copy link
Contributor

Docker Image for this PR:
https://ghcr.io/cratis/chronicle:14.10.3-pr2269.c40693a

docker run ghcr.io/cratis/chronicle:14.10.3-pr2269.c40693a

@github-actions
Copy link
Contributor

NuGet packages for this PR, e.g. Chronicle:
https://github.com/Cratis/Chronicle/pkgs/nuget/Cratis.Chronicle

Use version: 14.10.3-pr2269.c40693a

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Enable running integration specs for different setups

2 participants