Skip to content

chore: update aweXpect to 4.0.0-pre.3 - #201

Merged
vbreuss merged 1 commit into
mainfrom
chore/update-awexpect-4.0.0-pre.3
Oct 29, 2026
Merged

vbreuss merged 1 commit into
mainfrom
chore/update-awexpect-4.0.0-pre.3

Conversation

@vbreuss

@vbreuss vbreuss commented Oct 29, 2026

Copy link
Copy Markdown
Member

aweXpect 4.0.0-pre.3 replaces the experimental ITimeSystem with the standard TimeProvider (Testably/aweXpect#2148). It also adds CancelAfter on IEvaluationContext, which cancels on the clock of the evaluation, for extensions that wait with a timeout of their own, like a mock that waits for an interaction Within(timeout).

The Within timeout and the Then budget used CancellationTokenSource.CancelAfter and so always elapsed in real time, while the elapsed time was measured on the clock of the evaluation. With WithTimeProvider(…) and a virtual clock, they now elapse on that clock as well, so the timeout and the measured time agree. On the default real clock the behaviour does not change.

The test helper VirtualTimeSystem is replaced by a TimeProvider, VirtualTimeProvider, whose timers fire when the test advances the clock. Two new tests check that Within and the Then budget elapse on the given clock; without the change they wait 30 seconds of real time.

aweXpect 4.0.0-pre.3 replaces the experimental `ITimeSystem` with the standard `TimeProvider` (Testably/aweXpect#2148). It also adds `CancelAfter` on `IEvaluationContext`, which cancels on the clock of the evaluation, for extensions that wait with a timeout of their own, like a mock that waits for an interaction `Within(timeout)`.

The `Within` timeout and the `Then` budget used `CancellationTokenSource.CancelAfter` and so always elapsed in real time, while the elapsed time was measured on the clock of the evaluation. With `WithTimeProvider(…)` and a virtual clock, they now elapse on that clock as well, so the timeout and the measured time agree. On the default real clock the behaviour does not change.

The test helper `VirtualTimeSystem` is replaced by a `TimeProvider`, `VirtualTimeProvider`, whose timers fire when the test advances the clock. Two new tests check that `Within` and the `Then` budget elapse on the given clock; without the change they wait 30 seconds of real time.
@vbreuss vbreuss self-assigned this Oct 29, 2026
@vbreuss
vbreuss enabled auto-merge (squash) October 29, 2026 14:10
@sonarqubecloud

Copy link
Copy Markdown

@github-actions

Copy link
Copy Markdown

Test Results

    8 files  ± 0      8 suites  ±0   1m 25s ⏱️ ±0s
  454 tests + 2    454 ✅ + 2  0 💤 ±0  0 ❌ ±0 
2 961 runs  +14  2 961 ✅ +14  0 💤 ±0  0 ❌ ±0 

Results for commit 73f5042. ± Comparison against base commit 7868012.

@vbreuss
vbreuss merged commit 42a231e into main Oct 29, 2026
16 checks passed
@vbreuss
vbreuss deleted the chore/update-awexpect-4.0.0-pre.3 branch October 29, 2026 14:12
@github-actions

Copy link
Copy Markdown

👽 Mutation Results

Mutation testing badge

aweXpect.Mockolate

Details
File Score Killed Survived Timeout No Coverage Ignored Compile Errors Runtime Errors Total Detected Total Undetected Total Mutants
ThatVerificationResult.cs 99.00% 98 1 1 0 31 68 0 99 1 199
ThatVerificationResult.Then.cs 88.75% 67 9 4 0 14 31 0 71 9 125

The final mutation score is 94.44%

Coverage Thresholds: high:80 low:60 break:0

@github-actions

Copy link
Copy Markdown

🚀 Benchmark Results

Details

BenchmarkDotNet v0.15.8, Linux Ubuntu 26.04.1 LTS (Resolute Raccoon)
AMD EPYC 7763 3.12GHz, 1 CPU, 4 logical and 2 physical cores
.NET SDK 10.0.303
[Host] : .NET 10.0.14 (10.0.14, 10.0.1426.52326), X64 RyuJIT x86-64-v3
DefaultJob : .NET 10.0.14 (10.0.14, 10.0.1426.52326), X64 RyuJIT x86-64-v3

Method Mean Error Allocated
Dummy_aweXpect 0.0 ns 0.0 ns -

@github-actions

Copy link
Copy Markdown

This is addressed in release v4.0.0.

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

Labels

state: released The issue is released

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant