Rise
The Vieneo Province
Loading...
Searching...
No Matches
Discord Shutdown tests

Checks shutdown ordering and guards against network or social callbacks after teardown.

Subsystem: Networking, protocols and social integration
Fixture/harness: discordshutdowntests
Setup: The standalone DiscordShutdownTests harness owns the inputs, local helpers and assertion sink used by the case files below.

Build/entry point: Tests/DiscordShutdownTests.vcxproj; declared configurations: Release|x64, Debug|Win32, Release|Win32.

DiscordShutdownTests.cpp

Source: Tests/DiscordShutdownTests.cpp

Send

Fixture: Discord Shutdown tests
Case symbol: Send
Source: Tests/DiscordShutdownTests.cpp:53

Test
Support check: rejects attempts to send through a destroyed peer.
Source check messages (including original failure wording)

  • Send used a destroyed peer

Test Network Guard

Fixture: Discord Shutdown tests
Case symbol: TestNetworkGuard
Source: Tests/DiscordShutdownTests.cpp:74

Test
Checks that closed peers perform no network work and produce no spurious error.
Source check messages (including original failure wording)

  • Live unreliable send changed
  • Live ordered send changed
  • Live payload bound changed
  • Closed peer did work or reported a spurious error

Test Lifecycle

Fixture: Discord Shutdown tests
Case symbol: TestLifecycle
Source: Tests/DiscordShutdownTests.cpp:126

Test
Checks unauthenticated presence, exactly-once user callback delivery and identity-packet framing across SDK lifetime.
Source check messages (including original failure wording)

  • Unauthenticated presence must not wait for an OAuth user
  • Startup presence changed
  • Normal user callback did not send exactly once
  • Discord identity packet framing changed
  • Discord identity packet contents changed
  • Identity packet delivery changed
  • Shutdown callback still sent a packet
  • Shutdown republished presence
  • Shutdown callback used the game's logger
  • Social SDK cleanup was skipped
  • Network close was not idempotent

Test Callback After Network Close

Fixture: Discord Shutdown tests
Case symbol: TestCallbackAfterNetworkClose
Source: Tests/DiscordShutdownTests.cpp:161

Test
Checks that late user callbacks honor the closed-peer guard.
Source check messages (including original failure wording)

  • Late pre-destructor callback bypassed the closed-peer guard

Test Unavailable

Fixture: Discord Shutdown tests
Case symbol: TestUnavailable
Source: Tests/DiscordShutdownTests.cpp:171

Test
Checks an unavailable social SDK cannot access the peer.
Source check messages (including original failure wording)

  • Unavailable SDK accessed the peer

Test Queue And Reconnect

Fixture: Discord Shutdown tests
Case symbol: TestQueueAndReconnect
Source: Tests/DiscordShutdownTests.cpp:178

Test
Checks serialized presence updates, retention of the newest queued activity and wall-clock user-lookup cadence through reconnects.
Source check messages (including original failure wording)

  • Initial RPC requests missing
  • In-flight update mutated or overlapped
  • Newest queued activity was lost
  • User lookup ignored wall-clock cadence
  • Unchanged account was republished
  • Failed RPC was retried every frame
  • Retry lost latest activity
  • Repeated identical errors flooded logs
  • Backoff boundary failed
  • Desktop restart did not restore identity
  • Recovery was not logged
  • Discord account switch was lost
  • Account switch replayed an old screen
  • Stop was not idempotent
  • Stopped session processed a retained callback

Test Pending User Lookup

Fixture: Discord Shutdown tests
Case symbol: TestPendingUserLookup
Source: Tests/DiscordShutdownTests.cpp:227

Test
Test Pending User Lookup: A pending user query was duplicated; A pending user query blocked presence retry; Empty RPC user prevented future discovery.
Source check messages (including original failure wording)

  • A pending user query was duplicated
  • A pending user query blocked presence retry
  • Empty RPC user prevented future discovery

Test Inline Completion

Fixture: Discord Shutdown tests
Case symbol: TestInlineCompletion
Source: Tests/DiscordShutdownTests.cpp:242

Test
Test Inline Completion: Inline callbacks recursively submitted presence; Inline completion left presence stuck pending.
Source check messages (including original failure wording)

  • Inline callbacks recursively submitted presence
  • Inline completion left presence stuck pending

Test Ground Locations And Transitions

Fixture: Discord Shutdown tests
Case symbol: TestGroundLocationsAndTransitions
Source: Tests/DiscordShutdownTests.cpp:254

Test
Checks correct district/location presence, coordinate formatting and transitions without altering Steam presence.
Source check messages (including original failure wording)

  • Deois district was omitted or misidentified
  • Discord district detail changed Steam presence
  • Ground APN lost leading zeros or used wrong offsets
  • Discord parcel detail changed Steam presence
  • Water APN changed the existing state text
  • Discord water parcel changed Steam presence
  • Unavailable terrain advertised a stale APN
  • Invalid parcel sentinel became a public APN
  • Parcel coordinate origin changed
  • Named colony lost its type or reference page
  • Airborne or orbital presence retained a surface parcel
  • Docked presence retained terrain artwork
  • Simulator override was lost
  • Simulator acquired a real-world parcel detail
  • Simulator acquired a real-world district detail
  • Leaving simulator did not restore district detail
  • Menu retained a vehicle reference key