Skip to content

Fix lock TTL mismatch between test and implementation #517

Description

@DeFiVC

Bug Description

The withLock utility in src/utils/lock.ts uses a lock TTL of 60000ms (60 seconds) instead of the expected 30000ms (30 seconds) based on the test expectations.

Location

tests/unit/utils/lock.test.ts line 39

Expected: 30000
Received: 60000

The Problem

The test was written expecting a 30-second lock TTL, but the implementation uses 60 seconds. This could indicate:

  1. The TTL was changed from 30s to 60s at some point without updating the test
  2. The test expectations are outdated

Impact

  • One unit test always fails
  • The lock duration is longer than the test expects, which could affect timeout behavior in production

Acceptance Criteria

  • Determine the correct lock TTL (consult implementation docs/history)
  • Update either the test or the implementation to be consistent
  • Verify the lock utility tests pass

Severity

low - Test assertion mismatch. The 60-second TTL may be intentional for preventing race conditions in Stellar transactions.

Activity

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

Metadata

Metadata

Labels

Stellar WaveIssues in the Stellar wave programbugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions