stabilizaiton work - projects rework for maintenanceability and ui livening

This commit is contained in:
master
2026-02-03 23:40:04 +02:00
parent 074ce117ba
commit 557feefdc3
3305 changed files with 186813 additions and 107843 deletions

View File

@@ -0,0 +1,27 @@
// <copyright file="HybridLogicalClockTests.ReceiveSkew.cs" company="StellaOps">
// Copyright (c) StellaOps. Licensed under BUSL-1.1.
// </copyright>
using FluentAssertions;
using System;
using Xunit;
namespace StellaOps.HybridLogicalClock.Tests;
public sealed partial class HybridLogicalClockTests
{
[Fact]
public void Receive_ClockSkewExceeded_ThrowsException()
{
var timeProvider = CreateTimeProvider(FixedTime);
var maxSkew = TimeSpan.FromMinutes(1);
var clock = CreateClock(timeProvider, maxSkew: maxSkew);
var remote = CreateRemoteTimestamp(FixedTime.AddMinutes(2), 0);
var act = () => clock.Receive(remote);
act.Should().Throw<HlcClockSkewException>()
.Where(e => e.MaxAllowedSkew == maxSkew)
.Where(e => e.ActualSkew > maxSkew);
}
}