Skip to content

test(price-guard): test is_fresh at staleness and future-skew boundaries (#106) - #1127

Closed
jeffrey-graham wants to merge 1 commit into
DevTobis:mainfrom
jeffrey-graham:test/issue-106-is-fresh-boundaries
Closed

jeffrey-graham wants to merge 1 commit into
DevTobis:mainfrom
jeffrey-graham:test/issue-106-is-fresh-boundaries

Conversation

@jeffrey-graham

Copy link
Copy Markdown

Closes #106

Summary

  • Tests is_fresh directly and via publish_source / guarded_price at the exact staleness (age == max_staleness_s vs max_staleness_s + 1) and future-skew (observed_at == now + MAX_FUTURE_SKEW_S vs now + MAX_FUTURE_SKEW_S + 1) boundaries.
  • Verifies publish_source accepts now + MAX_FUTURE_SKEW_S (now + 60) and panics with "price-guard: reading is dated in the future" at now + MAX_FUTURE_SKEW_S + 1 (now + 61).

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Test PriceGuard is_fresh at the staleness and future-skew boundaries

1 participant