Add oracle service lifecycle integration tests#149
Merged
Smartdevs17 merged 7 commits intoSmartdevs17:mainfrom Mar 27, 2026
Merged
Conversation
added 3 commits
March 27, 2026 08:41
- Update Oracle from @stellar/stellar-sdk@^12.0.0 to @stellar/stellar-sdk@^14.5.0 - Replace deprecated SorobanRpc import with rpc import - Update all SorobanRpc references to rpc in contract-updater.ts - Update test mocks to use new rpc import structure - Ensure compatibility with API's SDK version Resolves Smartdevs17#56
- Update Oracle Node.js engine requirement to >=20.0.0 for SDK v14 compatibility - Remove Node.js 18 testing matrix for Oracle since SDK v14 requires Node.js 20+ - Add Vercel silent mode to reduce deployment noise on forks - Fix coverage upload conditions after removing matrix strategy Resolves CI failures and Quality Gate pending status
- Add comprehensive lifecycle.test.ts with 5 required test scenarios - Test normal start/stop cycle with resource leak prevention - Test double start scenarios for idempotency - Test stop during active price updates for graceful shutdown - Test restart after failure scenarios - Test graceful shutdown with pending updates - Mock external services (RPC, providers) to avoid actual API calls - Ensure proper resource cleanup and timing reliability - Addresses issue Smartdevs17#48 requirements Fixes Smartdevs17#48
|
Someone is attempting to deploy a commit to the smartdevs17's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
@iyanumajekodunmi756 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! 🚀 |
- Align test intervals with existing test patterns (1000ms) - Update timeout values to ensure proper test execution - Fix mock return types to match expected interfaces - Ensure circuit breaker configuration is included - Improve test reliability and reduce flaky behavior Resolves CI check failures and Vercel build issues
- Use npm ci instead of npm install for faster, reliable builds - Add NODE_ENV environment variable for production builds - Ensure consistent dependency resolution in CI/CD Resolves Vercel deployment issues
- Add version field for proper package management - Add npm engine requirement for consistency - Add shared devDependencies for workspace builds - Ensure proper dependency resolution across workspaces Resolves CI workspace build issues
Owner
|
LGTM. Kindly drop a review. Thank you. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
#48 Feature: Add Oracle service lifecycle integration tests
Repo Avatar
Smartdevs17/stellarlend
Problem
No tests exist for the main OracleService.start() and stop() lifecycle management. Race conditions in startup/shutdown are untested.
Context
Startup and shutdown edge cases (double-start, stop during update, restart) are common failure modes in production.
Proposed Solution
Add tests for:
Normal start/stop cycle
Double start (should be idempotent or error)
Stop during active price update
Restart after failure
Graceful shutdown with pending updates
Acceptance Criteria
All 5 scenarios tested
No resource leaks (intervals cleared, connections closed)
Tests run reliably (no flaky timing)
Technical Notes
File: New oracle/tests/lifecycle.test.ts
Constraints
Must mock external services (RPC, providers)
closes #48