You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Test helpers: purge_expired, inject_fault(table=) and replayed transactions #98
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
fix(testing): purge_expired, inject_fault(table=) and replayed transa…