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
default
<SlicerExecutionContext
>
Constructors
new default()
new default(
job
,options
):default
Parameters
Parameter | Type |
---|---|
job | JobConfigParams |
options | JobHarnessOptions |
Returns
Overrides
Source
teraslice-test-harness/src/slicer-test-harness.ts:40
Properties
assetPaths
readonly
assetPaths:string
[]
Inherited from
Source
teraslice-test-harness/src/base-test-harness.ts:24
clusterType?
optional
readonly
clusterType:ClusterManagerType
Inherited from
Source
teraslice-test-harness/src/base-test-harness.ts:25
context
readonly
context:TestContext
Inherited from
Source
teraslice-test-harness/src/base-test-harness.ts:22
events
readonly
events:EventEmitter
<DefaultEventMap
>
Inherited from
Source
teraslice-test-harness/src/base-test-harness.ts:20
executionContext
executionContext:
SlicerExecutionContext
Inherited from
Source
teraslice-test-harness/src/base-test-harness.ts:21
job
readonly
job:JobConfigParams
Inherited from
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
Parameter | Type |
---|---|
options | object |
options.fullResponse | false |
Returns
Promise
<(null
| SliceRequest
)[]>
Source
teraslice-test-harness/src/slicer-test-harness.ts:91
createSlices(options)
createSlices(
options
):Promise
<(null
|Slice
)[]>
Parameters
Parameter | Type |
---|---|
options | object |
options.fullResponse | true |
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 parameter | Value |
---|---|
T extends OpAPI | any |
Parameters
Parameter | Type |
---|---|
name | string |
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
Parameter | Type |
---|---|
options | object |
options.fullResponse | false |
Returns
Promise
<(null
| Slice
)[]>
Source
teraslice-test-harness/src/slicer-test-harness.ts:135
getAllSlices(options)
getAllSlices(
options
):Promise
<(null
|SliceRequest
)[]>
Parameters
Parameter | Type |
---|---|
options | object |
options.fullResponse | true |
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 parameter | Value |
---|---|
T extends default <APIConfig > | default <APIConfig > |
Parameters
Parameter | Type |
---|---|
name | string |
Returns
T
Source
teraslice-test-harness/src/slicer-test-harness.ts:193
initialize()
initialize(
recoveryData
):Promise
<void
>
Initialize the Operations on the ExecutionContext
Parameters
Parameter | Type | Default value | Description |
---|---|---|---|
recoveryData | SlicerRecoveryData [] | [] | is an array of starting points to recover from |
Returns
Promise
<void
>
Overrides
Source
teraslice-test-harness/src/slicer-test-harness.ts:52
makeContextConfig()
protected
makeContextConfig(job
,assets
,cluster_manager_type
):Promise
<ExecutionContextConfig
>
Parameters
Parameter | Type | Default value |
---|---|---|
job | JobConfigParams | undefined |
assets | string [] | undefined |
cluster_manager_type | ClusterManagerType | 'native' |
Returns
Promise
<ExecutionContextConfig
>
Inherited from
Source
teraslice-test-harness/src/base-test-harness.ts:53
onSliceComplete()
onSliceComplete(
result
):void
Parameters
Parameter | Type |
---|---|
result | SliceResult |
Returns
void
Source
teraslice-test-harness/src/slicer-test-harness.ts:173
onSliceDispatch()
onSliceDispatch(
slice
):void
Parameters
Parameter | Type |
---|---|
slice | Slice |
Returns
void
Source
teraslice-test-harness/src/slicer-test-harness.ts:169
setClients()
setClients(
clients
):void
Parameters
Parameter | Type |
---|---|
clients | TestClientConfig [] |
Returns
void
Inherited from
Source
teraslice-test-harness/src/base-test-harness.ts:49
setWorkers()
setWorkers(
count
):void
Parameters
Parameter | Type |
---|---|
count | number |
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
Source
teraslice-test-harness/src/slicer-test-harness.ts:203
slicer()
slicer<
T
>():T
Type parameters
Type parameter | Value |
---|---|
T extends default <OpConfig > | default <OpConfig > |
Returns
T