Skip to content

Commit

Permalink
Merge pull request #1112 from cardstack/stop-synapse-before-tests
Browse files Browse the repository at this point in the history
Stop synapse before running tests
  • Loading branch information
IanCal authored Mar 25, 2024
2 parents 4a7bec2 + 7a054b4 commit 9b4fbed
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions packages/matrix/docker/synapse/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,17 @@ interface StartOptions {
}
export async function synapseStart(
opts?: StartOptions,
stopExisting = true,
): Promise<SynapseInstance> {
if (stopExisting) {
// Stop the main server if it's running
let stopPromises = [dockerStop({ containerId: 'boxel-synapse' })];
for (const [id, _synapse] of synapses) {
// Stop any other synapses that are running
stopPromises.push(synapseStop(id));
}
await Promise.allSettled(stopPromises);
}
const synCfg = await cfgDirFromTemplate(
opts?.template ?? 'test',
opts?.dataDir,
Expand Down

0 comments on commit 9b4fbed

Please sign in to comment.