Skip to content

test: Add test suites for federation, auth builder, broadcaster, and request coalescer - #566

Merged
Kingsman-99 merged 4 commits into
Stellar-split:mainfrom
willowgray071-cpu:feature/test-federation-auth-broadcaster-coalescer
Jul 29, 2026
Merged

test: Add test suites for federation, auth builder, broadcaster, and request coalescer#566
Kingsman-99 merged 4 commits into
Stellar-split:mainfrom
willowgray071-cpu:feature/test-federation-auth-broadcaster-coalescer

Conversation

@willowgray071-cpu

Copy link
Copy Markdown

Summary

Implement comprehensive test suites for four critical SDK features:

Test Coverage

Each test suite validates acceptance criteria including:

  • Core functionality and expected behavior
  • Edge cases (concurrent calls, cache expiration, error handling)
  • Performance characteristics (batching, request deduplication)
  • Integration scenarios (nested invocations, reconnection logic)

Test Plan

  • All 38 tests pass with Vitest
  • RequestCoalescer: 9 tests for concurrent deduplication
  • InvoiceFundingBroadcaster: 7 tests for WebSocket broadcasting
  • ContractAuthBuilder: 8 tests for auth entry building
  • FederationResolver: 11 tests for address resolution and caching
  • No merge conflicts with main branch

Closes #459
Closes #458
Closes #457
Closes #456

Add comprehensive test suite for request coalescing functionality that
deduplicates concurrent identical RPC calls. Tests verify:
- 10 concurrent calls result in exactly 1 RPC request
- Rejection propagation to all concurrent callers
- Key normalization for equivalent arguments
- In-flight request counting
- Cache cleanup after settlement

Closes Stellar-split#456
…r-split#457

Add comprehensive test suite for WebSocket-based funding broadcaster that
sends structured diff payloads for real-time invoice funding updates. Tests verify:
- Batch 5 messages into single message within 100ms window
- Correct delta and per-recipient delta computation
- Stop lifecycle closes connection with close message
- Queue and flush diffs on reconnect without data loss
- Broadcaster statistics tracking

Closes Stellar-split#457
…t#458

Add comprehensive test suite for Soroban contract auth entry builder with
simulation pre-checks. Tests verify:
- Build produces valid auth entry with required fields
- AuthSimulationError thrown when simulation fails with diagnostic events
- Multi-signer entries include all signatures with correct weights
- Handles nested contract invocations
- Simulation cost included in build result
- Diagnostic events attached to error

Closes Stellar-split#458
…#459

Add comprehensive test suite for Stellar federation address resolver with
TOML caching and request coalescing. Tests verify:
- Federation address resolution with correct accountId lookup
- Raw public key passthrough without HTTP calls
- TTL-based cache with expired entry refresh
- Memoization of federation records
- Concurrent request coalescing
- Cache independence for multiple addresses
- Custom TTL configuration

Closes Stellar-split#459
@drips-wave

drips-wave Bot commented Jul 28, 2026

Copy link
Copy Markdown

@willowgray071-cpu Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@Kingsman-99
Kingsman-99 merged commit 71f908e into Stellar-split:main Jul 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants