Skip to content

Flaky test: contract::vault::pki::tests_raw::test_pki_module time-sensitive TTL assertion #11

Description

@Ivanbeethoven

Observed

When running the full cargo test --lib under load, test_pki_module fails at:

src/contract/vault/pki.rs:440: assertion failed: (ttl + 10) > expect_ttl

The same test passes in isolation (~5s) and on a clean baseline, so this is order/timing sensitivity, not a product regression.

Repro

  • full suite on a busy host: fails
  • cargo test --lib -- contract::vault::pki alone: passes

Suggested

Make the TTL assertion tolerant of issuance/elapsed-second rounding (compare ranges rather than ttl + 10 > expect_ttl) or freeze the clock in the test.

Context

Observed during MST/2 T03 verification (PR #10). Not caused by that change (vault is untouched).

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions