Skip to main content

teraslice-test-harness / job-test-harness / default

Class: default

A test harness for both the Slicer and Fetcher, utilizing both the Slicer and Worker test harnesses.

This is useful for testing Readers.

Todo

Handle more than one worker?

Constructors

new default()

new default(job, options): default

Parameters

ParameterType
jobJobConfigParams
optionsJobHarnessOptions

Returns

default

Source

teraslice-test-harness/src/job-test-harness.ts:31

Properties

slicerHarness

readonly slicerHarness: default

Source

teraslice-test-harness/src/job-test-harness.ts:29


workerHarness

readonly workerHarness: default

Source

teraslice-test-harness/src/job-test-harness.ts:28

Accessors

apis

get apis(): JobAPIInstances

Returns

JobAPIInstances

Source

teraslice-test-harness/src/job-test-harness.ts:48


processors

get processors(): default<OpConfig>[]

Returns

default<OpConfig>[]

Source

teraslice-test-harness/src/job-test-harness.ts:44

Methods

fetcher()

fetcher<T>(): T

Type parameters

Type parameterValue
T extends default<OpConfig>default<OpConfig>

Returns

T

Source

teraslice-test-harness/src/job-test-harness.ts:40


initialize()

initialize(recoveryData?): Promise<void>

Initialize the Operations in both of the Slicer and Worker contexts.

Parameters

ParameterTypeDescription
recoveryData?SlicerRecoveryData[]is an array of starting points to recover from the retry data is only passed to slicer

Returns

Promise<void>

Source

teraslice-test-harness/src/job-test-harness.ts:67


run()

run(): Promise<BatchedResults>

Create a batch of slices in the Slicer context and then run each slice on the Worker context in series.

Returns

Promise<BatchedResults>

batches of results

Source

teraslice-test-harness/src/job-test-harness.ts:78


runToCompletion()

runToCompletion(): Promise<SliceResults[]>

Gathers all slices from slicer and run them,

Returns

Promise<SliceResults[]>

an array of objects containing the slice and the data the reader generated

Source

teraslice-test-harness/src/job-test-harness.ts:131


setClients()

setClients(clients): Promise<void>

Set the Terafoundation Clients on both the Slicer and Worker contexts

Parameters

ParameterType
clientsTestClientConfig[]

Returns

Promise<void>

Source

teraslice-test-harness/src/job-test-harness.ts:56


shutdown()

shutdown(): Promise<void>

Shutdown both the Worker and Slicer test harness

Returns

Promise<void>

Source

teraslice-test-harness/src/job-test-harness.ts:151


slicer()

slicer<T>(): T

Type parameters

Type parameterValue
T extends default<OpConfig>default<OpConfig>

Returns

T

Source

teraslice-test-harness/src/job-test-harness.ts:36