Skip to main content

teraslice-test-harness / slicer-test-harness / default

Class: default

A base class for the Slicer and Worker TestHarnesses

Todo

Add support for validating the asset.json?

Extends

Constructors

new default()

new default(job, options): default

Parameters

ParameterType
jobJobConfigParams
optionsJobHarnessOptions

Returns

default

Overrides

default.constructor

Source

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

Properties

assetPaths

readonly assetPaths: string[]

Inherited from

default.assetPaths

Source

teraslice-test-harness/src/base-test-harness.ts:24


clusterType?

optional readonly clusterType: ClusterManagerType

Inherited from

default.clusterType

Source

teraslice-test-harness/src/base-test-harness.ts:25


context

readonly context: TestContext

Inherited from

default.context

Source

teraslice-test-harness/src/base-test-harness.ts:22


events

readonly events: EventEmitter<DefaultEventMap>

Inherited from

default.events

Source

teraslice-test-harness/src/base-test-harness.ts:20


executionContext

executionContext: SlicerExecutionContext

Inherited from

default.executionContext

Source

teraslice-test-harness/src/base-test-harness.ts:21


job

readonly job: JobConfigParams

Inherited from

default.job

Source

teraslice-test-harness/src/base-test-harness.ts:23


stats

readonly stats: ExecutionStats

Source

teraslice-test-harness/src/slicer-test-harness.ts:27

Accessors

apis

get apis(): JobAPIInstances

Returns

JobAPIInstances

Source

teraslice-test-harness/src/slicer-test-harness.ts:177

Methods

createSlices()

createSlices()

createSlices(): Promise<(null | SliceRequest)[]>

Create Slices, always returns an Array of slices or slice requests. To adjust the number of slicers change the job configuration when constructing this class.

If the slicers are done, you should expect a null value for every slicer

Returns

Promise<(null | SliceRequest)[]>

an array of Slices including the metadata or the just the Slice Request.

Source

teraslice-test-harness/src/slicer-test-harness.ts:90

createSlices(options)

createSlices(options): Promise<(null | SliceRequest)[]>

Parameters
ParameterType
optionsobject
options.fullResponsefalse
Returns

Promise<(null | SliceRequest)[]>

Source

teraslice-test-harness/src/slicer-test-harness.ts:91

createSlices(options)

createSlices(options): Promise<(null | Slice)[]>

Parameters
ParameterType
optionsobject
options.fullResponsetrue
Returns

Promise<(null | Slice)[]>

Source

teraslice-test-harness/src/slicer-test-harness.ts:92


getAPI()

getAPI<T>(name): T

Get the reference to a created API that a operation will use. This is different than getOperationAPI which the OperationAPI class instance

Type parameters

Type parameterValue
T extends OpAPIany

Parameters

ParameterType
namestring

Returns

T

Source

teraslice-test-harness/src/slicer-test-harness.ts:185


getAllSlices()

getAllSlices()

getAllSlices(): Promise<SliceResults>

Returns

Promise<SliceResults>

Source

teraslice-test-harness/src/slicer-test-harness.ts:134

getAllSlices(options)

getAllSlices(options): Promise<(null | Slice)[]>

Parameters
ParameterType
optionsobject
options.fullResponsefalse
Returns

Promise<(null | Slice)[]>

Source

teraslice-test-harness/src/slicer-test-harness.ts:135

getAllSlices(options)

getAllSlices(options): Promise<(null | SliceRequest)[]>

Parameters
ParameterType
optionsobject
options.fullResponsetrue
Returns

Promise<(null | SliceRequest)[]>

Source

teraslice-test-harness/src/slicer-test-harness.ts:136


getOperationAPI()

getOperationAPI<T>(name): T

Get the instantiated OperationAPI class instance from the apis. If you are looking for the APIs that created during run time, use getAPI.

Type parameters

Type parameterValue
T extends default<APIConfig>default<APIConfig>

Parameters

ParameterType
namestring

Returns

T

Source

teraslice-test-harness/src/slicer-test-harness.ts:193


initialize()

initialize(recoveryData): Promise<void>

Initialize the Operations on the ExecutionContext

Parameters

ParameterTypeDefault valueDescription
recoveryDataSlicerRecoveryData[][]is an array of starting points to recover from

Returns

Promise<void>

Overrides

default.initialize

Source

teraslice-test-harness/src/slicer-test-harness.ts:52


makeContextConfig()

protected makeContextConfig(job, assets, cluster_manager_type): Promise<ExecutionContextConfig>

Parameters

ParameterTypeDefault value
jobJobConfigParamsundefined
assetsstring[]undefined
cluster_manager_typeClusterManagerType'native'

Returns

Promise<ExecutionContextConfig>

Inherited from

default.makeContextConfig

Source

teraslice-test-harness/src/base-test-harness.ts:53


onSliceComplete()

onSliceComplete(result): void

Parameters

ParameterType
resultSliceResult

Returns

void

Source

teraslice-test-harness/src/slicer-test-harness.ts:173


onSliceDispatch()

onSliceDispatch(slice): void

Parameters

ParameterType
sliceSlice

Returns

void

Source

teraslice-test-harness/src/slicer-test-harness.ts:169


setClients()

setClients(clients): void

Parameters

ParameterType
clientsTestClientConfig[]

Returns

void

Inherited from

default.setClients

Source

teraslice-test-harness/src/base-test-harness.ts:49


setWorkers()

setWorkers(count): void

Parameters

ParameterType
countnumber

Returns

void

Source

teraslice-test-harness/src/slicer-test-harness.ts:163


shutdown()

shutdown(): Promise<void>

Shutdown the Operations on the ExecutionContext

Returns

Promise<void>

Overrides

default.shutdown

Source

teraslice-test-harness/src/slicer-test-harness.ts:203


slicer()

slicer<T>(): T

Type parameters

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

Returns

T

Source

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