Skip to main content

createHarness

@forge/monorepo


@forge/monorepo / backend/src / createHarness

Function: createHarness()

createHarness(input): Promise<Harness>

Defined in: backend/src/loadtest/harness.ts:308

Build the harness over an already-migrated schema.

Takes a SqlExecutor rather than a URL so the caller owns the connection: the database-unavailable injector needs to stop the server underneath a live pool, and a harness that owned the pool would reconnect on its own schedule and the injector could not control the window.

Parameters

input

config

HarnessConfig

now?

() => number

sleep?

(ms) => Promise<void>

sql

SqlExecutor

Returns

Promise<Harness>