Skip to content

Move Tsavorite.test.epoch into Tsavorite.slnx and run it in CI - #2044

Merged
Tiago Nápoli (tiagonapoli) merged 1 commit into
microsoft:mainfrom
tiagonapoli:tiagonapoli/move-epoch-tests-to-tsavorite-sln
Aug 8, 2026
Merged

Move Tsavorite.test.epoch into Tsavorite.slnx and run it in CI#2044
Tiago Nápoli (tiagonapoli) merged 1 commit into
microsoft:mainfrom
tiagonapoli:tiagonapoli/move-epoch-tests-to-tsavorite-sln

Conversation

@tiagonapoli

@tiagonapoli Tiago Nápoli (tiagonapoli) commented Aug 7, 2026

Copy link
Copy Markdown
Collaborator

Why did Tsavorite.test.epoch end up in Garnet.slnx?

Because it took a ProjectReference on Garnet.test.csproj:

<ProjectReference Include="..\..\src\core\Tsavorite.core.csproj" />
<ProjectReference Include="..\..\..\..\..\..\test\standalone\Garnet.test\Garnet.test.csproj" />

The only thing it needs from there is Garnet.test.TestBase, the ~30-line
running-test tracker that EpochTestBase derives from. But that reference pulls
the entire transitive closure of Garnet.testGarnet.client, Garnet.common,
Garnet.host, Garnet.server, GarnetServer, GarnetJSON, NoOpModule,
GarnetRoaringBitmap, Garnet.fuzz, plus StackExchange.Redis,
Microsoft.CodeAnalysis and diskann-garnet — into the project. Landing that in
Tsavorite.slnx would make the standalone Tsavorite build (and CI's dedicated
Build Tsavorite job, which restores only that solution) compile the whole Garnet
server stack. So the project got parked in Garnet.slnx instead.

Every other Tsavorite test project already solves this

The TestBase dependency is not unique to the epoch tests — ~77 files across the
Tsavorite test tree do using Garnet.test; class Foo : TestBase. None of them
reference Garnet.test.csproj. The convention is hub-and-spoke:

  • Tsavorite.test.csproj source-links the single file:
    <Compile Include="..\..\..\..\..\test\standalone\Garnet.test\TestBase.cs" Link="TestBase.cs" />
  • test.hlog, test.recovery, test.recordops, test.session,
    test.session.context and test.stress each ProjectReference Tsavorite.test.csproj
    and inherit it.

Tsavorite.test.epoch was the sole exception, and that single edge is what pinned
it into the wrong solution.

The knock-on bug

The misplacement also meant the epoch tests ran in no CI matrix at all:

  • the Garnet test matrix lists explicit project names and does not include Tsavorite.test.epoch;
  • the Tsavorite test matrix only covers projects in Tsavorite.slnx.

Garnet.slnx compiled the assembly, and nothing ever executed it. The 15 tests
added alongside the LightEpoch slot-claim CAS hardening have never guarded a
single PR.

Changes

  • Tsavorite.test.epoch.csproj: replace the Garnet.test ProjectReference with a ProjectReference to Tsavorite.test.csproj, matching every sibling Tsavorite test project.
  • Move the project entry from the Garnet.slnx /test/ folder to the Tsavorite.slnx /test/ folder.
  • Add Tsavorite.test.epoch to the Tsavorite CI test matrix and its directory map. It touches no blob storage, so it joins the set excluded from the Azurite setup / RunAzureTests steps.

playground/LightEpochLitmus is left where it is — it is a Garnet-side playground
executable and belongs in Garnet.slnx.

Validation

  • dotnet build libs/storage/Tsavorite/cs/Tsavorite.slnx -c Debug — succeeds, 0 warnings.
  • dotnet test libs/storage/Tsavorite/cs/test/test.epoch -f net10.0 -c Debug — 15/15 pass.
  • dotnet format libs/storage/Tsavorite/cs/Tsavorite.slnx --verify-no-changes — clean.
  • dotnet restore Garnet.slnx — still resolves after the removal; nothing referenced the epoch test project.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR moves Tsavorite.test.epoch back into the Tsavorite-only solution (Tsavorite.slnx) by removing its full Garnet.test project dependency and source-linking just TestBase.cs, and then ensures the epoch test project is executed in the Tsavorite CI test matrix.

Changes:

  • Add Tsavorite.test.epoch to libs/storage/Tsavorite/cs/Tsavorite.slnx and remove it from Garnet.slnx.
  • Update Tsavorite.test.epoch.csproj to drop the Garnet.test.csproj ProjectReference and instead link test/standalone/Garnet.test/TestBase.cs.
  • Extend the Tsavorite CI test matrix and directory map to run Tsavorite.test.epoch, excluding it from Azurite setup since it does not require Azure storage.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
libs/storage/Tsavorite/cs/Tsavorite.slnx Adds Tsavorite.test.epoch to the standalone Tsavorite solution so it can be built/tested in Tsavorite-only CI.
libs/storage/Tsavorite/cs/test/test.epoch/Tsavorite.test.epoch.csproj Removes Garnet.test project dependency; links TestBase.cs directly to keep the project Tsavorite-standalone.
Garnet.slnx Removes Tsavorite.test.epoch from the Garnet solution to avoid “compiled but never run” placement.
.github/workflows/ci.yml Adds Tsavorite.test.epoch to the Tsavorite CI matrix and maps it to its directory; excludes it from Azurite setup steps.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Tsavorite.test.epoch was listed in Garnet.slnx instead of Tsavorite.slnx
because it took a ProjectReference on Garnet.test.csproj to reach
Garnet.test.TestBase. That reference drags the whole Garnet server stack
into the standalone Tsavorite build, so the project could not sit in
Tsavorite.slnx alongside the other Tsavorite test projects.

Every other Tsavorite test project already gets TestBase the same way:
Tsavorite.test.csproj source-links TestBase.cs, and test.hlog, test.recovery,
test.recordops, test.session, test.session.context and test.stress reference
Tsavorite.test.csproj to pick it up. Follow that convention here and drop the
Garnet.test reference.

The misplacement also meant the epoch tests ran in no CI matrix at all:
the Garnet matrix does not list Tsavorite.test.epoch, and the Tsavorite
matrix only covers projects in Tsavorite.slnx. Add Tsavorite.test.epoch to
the Tsavorite test matrix and its directory map; it touches no blob storage,
so it joins the projects excluded from the Azurite setup steps.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@tiagonapoli
Tiago Nápoli (tiagonapoli) force-pushed the tiagonapoli/move-epoch-tests-to-tsavorite-sln branch from 16f4b44 to 7507f45 Compare August 7, 2026 23:44
@tiagonapoli
Tiago Nápoli (tiagonapoli) merged commit ff611e2 into microsoft:main Aug 8, 2026
217 of 219 checks passed
@tiagonapoli
Tiago Nápoli (tiagonapoli) deleted the tiagonapoli/move-epoch-tests-to-tsavorite-sln branch August 8, 2026 00:38
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.

3 participants