test: add regression coverage for FxQuorumEvaluator validation - #1234
Merged
thlpkee20-wq merged 1 commit intoSep 29, 2026
Conversation
|
@priscannanna85-lgtm Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
This PR adds focused regression coverage for the
METRIC_QUORUM_EVALUATEDfailure handling inFxQuorumEvaluator. The evaluator throws explicit errors whenk,tolerance, orreferenceare invalid; these branches previously had no dedicated tests, so silent behavior changes could slip through. This change exercises those branches, asserts the exact error contract, and adds neighboring success and boundary cases.Related Issue
Changes
🧪 Quorum Evaluator Regression Tests
[MODIFY]
src/services/fxQuorumEvaluator.tsk,tolerance, andreferenceare exercised as-is.throw new Error(...)sites remain observable and deterministic for callers.[ADD]
src/services/fxQuorumEvaluator.test.tsknon-integer /k < 1→FxQuorumEvaluator: k must be an integer >= 1.tolerancenon-finite / negative →FxQuorumEvaluator: tolerance must be a finite number >= 0.referencenot'median'or'mean'→FxQuorumEvaluator: reference must be 'median' or 'mean'.k = 1(minimum valid) andtolerance = 0(minimum valid).reference = 'median'andreference = 'mean'both accepted.Verification Results
k,tolerance,referenceplus a valid-input success casek = 1andtolerance = 0boundaries coveredCloses #1096