Skip to content

Test helpers: purge_expired, inject_fault(table=) and replayed transactions #98

Closed

Description

@fctl-sh

Priority: low. The testing helpers and the in-memory backend's handling of them:

  • testing.purge_expired() deletes items DynamoDB's TTL never deletes (backend/memory/mod.rs): items whose TTL is more than five years in the past are not considered for deletion by DynamoDB ("To be considered for expiry and deletion, the TTL can't be more than five years in the past"); with TTL values of 10 years ago and 0, both are purged. tests.rs uses expires = 1_000 and encodes the wrong rule.
  • inject_fault(table=...) only looks at the first table of a call (mod.rs): table="bbb" never fires for a BatchWriteItem or transaction that writes aaa and bbb, nor for SELECT * FROM bbb (PartiQL passes no table); the fault stays pending and fires on a later call, and table="aaa" marks both tables' requests unprocessed. testing.py documents table as the table the fault applies to.
  • A replayed TransactWriteItems with the same token reports no consumed capacity (transact.rs returns a default output); DynamoDB returns the read units of the replay.

Found in a review of the library for bugs (fctl session); the fixes that fit in its ten pull requests are #61 to #65, #67 to #70 and #72.

Activity

  1. added
    bug
    rust
    on Oct 30, 2026
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

    bugrust

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions