Skip to content

test: harden core runtime coverage gaps#462

Merged
JerrettDavis merged 2 commits into
mainfrom
coverage/harden-next-gaps-413-415
May 31, 2026
Merged

test: harden core runtime coverage gaps#462
JerrettDavis merged 2 commits into
mainfrom
coverage/harden-next-gaps-413-415

Conversation

@JerrettDavis

Copy link
Copy Markdown
Owner

Summary

  • Add TinyBDD scenarios for EventDrivenConsumer context, exception, null, and handler result validation paths
  • Cover Table Data Gateway missing mutations, cancellation, list/comparer behavior, and null mutation inputs
  • Cover synchronous BulkheadPolicy queue, rejection, timeout, and metadata/result paths

Validation

  • dotnet test test/PatternKit.Tests/PatternKit.Tests.csproj --configuration Release -p:TestTfmsInParallel=false --filter "FullyQualifiedNameTableDataGatewayTests|FullyQualifiedNameEventDrivenConsumerTests"
  • dotnet test test/PatternKit.Tests/PatternKit.Tests.csproj --configuration Release -p:TestTfmsInParallel=false --filter "FullyQualifiedName~BulkheadPolicyTests"
  • dotnet test test/PatternKit.Tests/PatternKit.Tests.csproj --configuration Release --no-build -p:TestTfmsInParallel=false

Refs #414

Copilot AI review requested due to automatic review settings May 30, 2026 23:38
@github-actions

github-actions Bot commented May 30, 2026

Copy link
Copy Markdown
Contributor

⚠️ Deprecation Warning: The deny-licenses option is deprecated for possible removal in the next major release. For more information, see issue 997.

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

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 adds focused runtime tests to close coverage gaps for core messaging, bulkhead, and table data gateway behavior tied to issue #414.

Changes:

  • Adds EventDrivenConsumer coverage for default contexts, thrown handlers, null messages, and result validation.
  • Adds synchronous BulkheadPolicy scenarios for rejection, queueing, timeout, and metadata/result assertions.
  • Adds TableDataGateway scenarios for missing mutations, comparer-backed listing/conflicts, cancellation, and null mutation validation.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
test/PatternKit.Tests/Messaging/Consumers/EventDrivenConsumerTests.cs Adds behavioral tests for consumer acceptance and handler result validation paths.
test/PatternKit.Tests/Cloud/Bulkhead/BulkheadPolicyTests.cs Adds synchronous bulkhead queue/reject/timeout coverage.
test/PatternKit.Tests/Application/TableDataGateway/TableDataGatewayTests.cs Adds gateway mutation, comparer, cancellation, and validation coverage.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

await entered.Task;

var second = Task.Run(() => policy.Execute(static () => 2));
SpinWait.SpinUntil(() => policy.QueuedCount == 1, TimeSpan.FromSeconds(2));
@github-actions

github-actions Bot commented May 30, 2026

Copy link
Copy Markdown
Contributor

Test Results

    12 files      12 suites   10m 36s ⏱️
 3 953 tests  3 953 ✅ 0 💤 0 ❌
12 290 runs  12 290 ✅ 0 💤 0 ❌

Results for commit cf7f8fd.

♻️ This comment has been updated with latest results.

@github-actions

github-actions Bot commented May 30, 2026

Copy link
Copy Markdown
Contributor

🔍 PR Validation Results

Version: ``

✅ Validation Steps

  • Build solution
  • Run tests
  • Build documentation
  • Dry-run NuGet packaging

📊 Artifacts

Dry-run artifacts have been uploaded and will be available for 7 days.


This comment was automatically generated by the PR validation workflow.

@codecov

codecov Bot commented May 30, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.91%. Comparing base (c186e7e) to head (cf7f8fd).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #462      +/-   ##
==========================================
+ Coverage   96.68%   96.91%   +0.22%     
==========================================
  Files         579      579              
  Lines       47147    47147              
  Branches     3095     6757    +3662     
==========================================
+ Hits        45586    45692     +106     
+ Misses       1561     1455     -106     
Flag Coverage Δ
unittests 96.91% <ø> (+0.22%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@JerrettDavis JerrettDavis changed the title Harden core runtime coverage gaps test: harden core runtime coverage gaps May 30, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Code Coverage

Summary
  Generated on: 05/31/2026 - 00:00:19
  Coverage date: 05/30/2026 - 23:57:20 - 05/31/2026 - 00:00:06
  Parser: MultiReport (12x Cobertura)
  Assemblies: 5
  Classes: 1715
  Files: 579
  Line coverage: 96.7%
  Covered lines: 45621
  Uncovered lines: 1526
  Coverable lines: 47147
  Total lines: 100699
  Branch coverage: 82.5% (14221 of 17232)
  Covered branches: 14221
  Total branches: 17232
  Method coverage: 96.8% (8933 of 9223)
  Full method coverage: 90.7% (8366 of 9223)
  Covered methods: 8933
  Fully covered methods: 8366
  Total methods: 9223

PatternKit.Core                                                                                                       96%
  PatternKit.Application.ActivityTracking.ActivityGateState                                                          100%
  PatternKit.Application.ActivityTracking.ActivityLease                                                              100%
  PatternKit.Application.ActivityTracking.ActivityRecord                                                             100%
  PatternKit.Application.ActivityTracking.ActivityTracker                                                            100%
  PatternKit.Application.Aggregates.AggregateCommandHandler<T1, T2, T3>                                              100%
  PatternKit.Application.Aggregates.AggregateCommandResult<T>                                                        100%
  PatternKit.Application.Aggregates.AggregateRoot<T1, T2>                                                            100%
  PatternKit.Application.AntiCorruption.AntiCorruptionLayer<T1, T2>                                                 90.4%
  PatternKit.Application.AntiCorruption.AntiCorruptionResult<T>                                                      100%
  PatternKit.Application.AuditLog.AuditLogAppendResult<T>                                                           85.7%
  PatternKit.Application.AuditLog.InMemoryAuditLog<T1, T2>                                                          95.4%
  PatternKit.Application.BoundedContexts.BoundedContextAdapter                                                       100%
  PatternKit.Application.BoundedContexts.BoundedContextCapability                                                   83.3%
  PatternKit.Application.BoundedContexts.BoundedContextDescriptor                                                   95.4%
  PatternKit.Application.ContextMaps.ContextMapDescriptor                                                           96.8%
  PatternKit.Application.ContextMaps.ContextMapRelationship                                                          100%
  PatternKit.Application.DataMapping.DataMapper<T1, T2>                                                             94.6%
  PatternKit.Application.DataMapping.DataMapperError                                                                  90%
  PatternKit.Application.DataMapping.DataMapperResult<T>                                                            84.6%
  PatternKit.Application.DomainEvents.DomainEventDispatcher<T>                                                      95.4%
  PatternKit.Application.DomainEvents.DomainEventDispatchResult                                                      100%
  PatternKit.Application.DomainServices.DomainServiceOperation<T1, T2>                                               100%
  PatternKit.Application.DomainServices.DomainServiceRegistry<T1, T2>                                                100%
  PatternKit.Application.EventSourcing.EventStoreAppendResult                                                        100%
  PatternKit.Application.EventSourcing.InMemoryEventStore<T1, T2>                                                   97.9%
  PatternKit.Application.EventSourcing.StoredEvent<T1, T2>                                                            80%
  PatternKit.Application.EventualConsistency.EventualConsistencyEvaluation<T>                                       92.3%
  PatternKit.Application.EventualConsistency.EventualConsistencyMonitor<T>                                          97.2%
  PatternKit.Application.EventualConsistency.EventualConsistencyMonitorState<T>                                      100%
  PatternKit.Application.EventualConsistency.EventualConsistencyWatermarks<T>                                       96.7%
  PatternKit.Application.FeatureToggles.FeatureToggleDecision                                                       87.5%
  PatternKit.Application.FeatureToggles.FeatureToggleRule<T>                                                         100%
  PatternKit.Application.FeatureToggles.FeatureToggleSet<T>                                                         96.9%
  PatternKit.Application.IdentityMap.IdentityMap<T1, T2>                                                             100%
  PatternKit.Application.IdentityMap.IdentityMapResult<T>                                                           92.8%
  PatternKit.Application.ManualTaskGates.ManualTaskGate<T>                                                          98.5%
  PatternKit.Application.ManualTaskGates.ManualTaskGateState<T>                                                      100%
  PatternKit.Application.ManualTaskGates.ManualTaskRecord<T>                                                        96.9%

@JerrettDavis JerrettDavis merged commit 58ad9b3 into main May 31, 2026
12 checks passed
@JerrettDavis JerrettDavis deleted the coverage/harden-next-gaps-413-415 branch May 31, 2026 00:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants