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

  1. Fatima0105 commented on Sep 30, 2026

    @Fatima0105

    @Fatima0105 has applied to work on this issue as part of the Stellar Wave Program's 9th wave.

    pls I would like to work on this issue

    ℹ️ Repo Maintainers: To accept this application, review their application or assign @Fatima0105 to this issue.

  2. somotochukwu-dev commented on Sep 30, 2026

    @somotochukwu-dev

    @somotochukwu-dev has applied to work on this issue as part of the Stellar Wave Program's 9th wave.

    Hi
    Please assign this issue to me
    Thanks

    ℹ️ Repo Maintainers: To accept this application, review their application or assign @somotochukwu-dev to this issue.

  3. PrimeFactor-Dev commented on Sep 30, 2026

    @PrimeFactor-Dev
    Contributor

    @PrimeFactor-Dev has applied to work on this issue as part of the Stellar Wave Program's 9th wave.

    I would love to work on this issue.

    ℹ️ Repo Maintainers: To accept this application, review their application or assign @PrimeFactor-Dev to this issue.

  4. drips-wave commented on Sep 30, 2026

    @drips-wave

    Congratulations, @PrimeFactor-Dev! 🎉 Your application was accepted by the repo's maintainers, and the issue is due on September 30, 2026.

    🧑‍💻 @PrimeFactor-Dev: Please resolve the issue such that the repo's maintainers have enough time to review your contribution before the due date. You'll earn Points for completing the issue on-time, which will make you eligible for a share of the Stellar Wave Program's reward pool.

    Warning

    When opening a PR, please link it to this issue to ensure it gets tracked accurately. Points are awarded when this issue is marked as completed by the maintainer.

    🤠 Repo maintainers: Please keep an eye on the contributor's progress and review their work before the due date. You can manage this issue, including adjusting its complexity and points, here.

    🌊 Happy Wave 🌊

  5. grantfox-oss commented on Oct 2, 2026

    @grantfox-oss

    🎉 This issue has been marked as completed on GrantFox!

    @PrimeFactor-Dev's PR #550 was approved and merged by @DeFiVC.

    🏆 @PrimeFactor-Dev: You earned 35 FoxPoints for this contribution! Your current tier: Explorer (551 total points). Track your full progress on GrantFox.

    👏 Great work, @PrimeFactor-Dev! Keep contributing to ChainLearnOfficial.

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