Skip to content

Commit

Permalink
Catch error that is thrown for stopping PG in the unit tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
kevin-dp committed Apr 23, 2024
1 parent a62c6a6 commit 67b8609
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion clients/typescript/test/satellite/process.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,17 @@ const startSatellite = async (
) => {
await satellite.start(authState)
satellite.setToken(token)
const connectionPromise = satellite.connectWithBackoff()
const connectionPromise = satellite.connectWithBackoff().catch((e) => {
if (
e.message === 'terminating connection due to administrator command' ||
e.message ===
'Client has encountered a connection error and is not queryable'
) {
// This is to be expected as we stop Satellite at the end of the test
return
}
throw e
})
return { connectionPromise }
}

Expand Down

0 comments on commit 67b8609

Please sign in to comment.