stabilizaiton work - projects rework for maintenanceability and ui livening
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user