Skip to content

Add Network Failure Injection Tests for Wallet Submission and Polling #645

@Emmyt24

Description

@Emmyt24

title: Add Network Failure Injection Tests for Wallet Submission and Polling

Description:
Introduce failure injection tests covering RPC outages, Horizon timeouts, dropped responses, and flaky wallet signing to harden the integration layer.

Requirements and Context:

  • Real production failures are usually transient or partial
  • Current tests focus more on happy path than degraded conditions
  • Must cover submission, confirmation polling, and backend event fetch loops

Suggested Execution:
Fork and Branch

  • git checkout -b test/network-failure-injection

Implement Changes::
Files to Edit:

  • frontend/src/services/stellar.service.ts - Make transport failures injectable in tests
  • frontend/src/services/transactionMonitor.ts - Add deterministic backoff hooks for tests
  • backend/src/services/stellarEventListener.ts - Support mocked failure responses

Files to Create:

  • frontend/src/services/__tests__/stellar-network-failure.test.ts - Frontend failure tests
  • backend/src/__tests__/stellarEventListener.failure-injection.test.ts - Backend polling failure tests

Test

  • Verify retries happen for transient network errors
  • Verify terminal failures stop cleanly
  • Verify user-facing errors remain actionable

Commit

  • git add .
  • git commit -m "test(integration): add network failure injection coverage"

Guidelines:

  • Use deterministic timers in tests
  • Exercise both retryable and non-retryable error classes

Metadata

Metadata

Assignees

No one assigned

    Labels

    Stellar WaveIssues in the Stellar wave program

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions