Skip to content

Offline emergency-switch tests start public testnet requests during setup #6470

Backlog

Description

@thepastaclaw

PastaClaw flagged this while reviewing #6242, where it was deferred to a follow-up instead of being fixed in that pull request. This issue tracks the follow-up.

Offline emergency-switch tests start public testnet requests during setup (suggestion)

Impact: Developers and CI runners executing this class trigger outbound requests to the public testnet quorum service even though all three tests check local validation.

Where: packages/kotlin-sdk/sdk/src/androidTest/kotlin/org/dashfoundation/dashsdk/EmergencySwitchesFfiTest.kt:37-40 at 60c0c6b271b8:

handle = SdkNative.createTrusted(
network = 1,
dapiAddresses = null,
quorumUrl = null,

The switch calls reject their inputs locally, but each test's @​Before schedules a network refresh. With network = 1 and quorumUrl = null, createTrusted selects https://quorums.testnet.networks.dash.org. After constructing the SDK, dash_sdk_create_with_fixed_provider spawns refresh_quorum_caches(), which requests /quorums and /previous. The tests do not await that task, so they can pass without connectivity while still attempting external requests. Set the fixture's quorumUrl to a loopback stub so the test keeps the live handle it needs to reach the real FFI parser without contacting testnet.

Origin

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions