Skip to content

test: use EphemeralTestnet singleton in nexus-watcher tests#671

Open
ok300 wants to merge 4 commits intopubky:mainfrom
ok300:ok300-nexus-watcher-tests-shared-testnet
Open

test: use EphemeralTestnet singleton in nexus-watcher tests#671
ok300 wants to merge 4 commits intopubky:mainfrom
ok300:ok300-nexus-watcher-tests-shared-testnet

Conversation

@ok300
Copy link
Contributor

@ok300 ok300 commented Jan 7, 2026

This PR simplifies test setup in the nexus-watcher suite by only initializing the test stack and the EphemeralTestnet once, then re-using them across the nexus-watcher tests.

@ok300 ok300 requested review from SHAcollision and tipogi January 7, 2026 10:14
@ok300 ok300 changed the title test: use shared instance of EphemeralTestnet in nexus-watcher tests test: use EphemeralTestnet singleton in nexus-watcher tests Jan 7, 2026
Copy link
Collaborator

@SHAcollision SHAcollision left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO good to merge. But i thought it might be relevant to raise for you this Codex comment:

  1. create_external_test_homeserver() depends on global initialization order
    • The helper now errors if SHARED_TESTNET is not initialized, which is correct but fragile. If any future test calls this helper without first going through WatcherTest::setup(), it will return an error (SHARED_TESTNET not initialized) and fail unexpectedly.
    • Recommendation: either make create_external_test_homeserver() lazily initialize the testnet, or document the required initialization order clearly.

@tipogi tipogi added 👀 watcher Nexus indexer related operations 🧪 tests Quality checks and coverage labels Feb 12, 2026
@tipogi tipogi added this to the 2026-Q1 milestone Feb 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🧪 tests Quality checks and coverage 👀 watcher Nexus indexer related operations

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants