teraslice-test-harness / slicer-test-harness / default
Class: default
Defined in: teraslice-test-harness/src/slicer-test-harness.ts:26
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
Defined in: teraslice-test-harness/src/slicer-test-harness.ts:40
Parameters
Parameter | Type |
---|---|
job | JobConfigParams |
options | JobHarnessOptions |
Returns
Overrides
Properties
Property | Modifier | Type | Inherited from | Defined in |
---|---|---|---|---|
assetPaths | readonly | string [] | default .assetPaths | teraslice-test-harness/src/base-test-harness.ts:24 |
clusterType? | readonly | ClusterManagerType | default .clusterType | teraslice-test-harness/src/base-test-harness.ts:25 |
context | readonly | TestContext | default .context | teraslice-test-harness/src/base-test-harness.ts:22 |
events | readonly | EventEmitter | default .events | teraslice-test-harness/src/base-test-harness.ts:20 |
executionContext | public | SlicerExecutionContext | default .executionContext | teraslice-test-harness/src/base-test-harness.ts:21 |
job | readonly | JobConfigParams | default .job | teraslice-test-harness/src/base-test-harness.ts:23 |
stats | readonly | ExecutionStats | - | teraslice-test-harness/src/slicer-test-harness.ts:27 |
Accessors
apis
Get Signature
get apis():
JobAPIInstances
Defined in: teraslice-test-harness/src/slicer-test-harness.ts:177
Returns
JobAPIInstances
Methods
createSlices()
Call Signature
createSlices():
Promise
<(null
|SliceRequest
)[]>
Defined in: teraslice-test-harness/src/slicer-test-harness.ts:90
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.
Call Signature
createSlices(
options
):Promise
<(null
|SliceRequest
)[]>
Defined in: teraslice-test-harness/src/slicer-test-harness.ts:91
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
Parameters
Parameter | Type | Description |
---|---|---|
options | { fullResponse : false ; } | an optional object of additional configuration |
options.fullResponse | false | if specified the full slice result including the slice_id, slicer_id, slicer_order. |
Returns
Promise
<(null
| SliceRequest
)[]>
an array of Slices including the metadata or the just the Slice Request.
Call Signature
createSlices(
options
):Promise
<(null
|Slice
)[]>
Defined in: teraslice-test-harness/src/slicer-test-harness.ts:92
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
Parameters
Parameter | Type | Description |
---|---|---|
options | { fullResponse : true ; } | an optional object of additional configuration |
options.fullResponse | true | if specified the full slice result including the slice_id, slicer_id, slicer_order. |
Returns
Promise
<(null
| Slice
)[]>
an array of Slices including the metadata or the just the Slice Request.
getAllSlices()
Call Signature
getAllSlices():
Promise
<SliceResults
>
Defined in: teraslice-test-harness/src/slicer-test-harness.ts:134
Returns
Promise
<SliceResults
>
Call Signature
getAllSlices(
options
):Promise
<(null
|Slice
)[]>
Defined in: teraslice-test-harness/src/slicer-test-harness.ts:135
Parameters
Parameter | Type |
---|---|
options | { fullResponse : false ; } |
options.fullResponse | false |
Returns
Promise
<(null
| Slice
)[]>
Call Signature
getAllSlices(
options
):Promise
<(null
|SliceRequest
)[]>
Defined in: teraslice-test-harness/src/slicer-test-harness.ts:136
Parameters
Parameter | Type |
---|---|
options | { fullResponse : true ; } |
options.fullResponse | true |
Returns
Promise
<(null
| SliceRequest
)[]>
getAPI()
getAPI<
T
>(name
):T
Defined in: teraslice-test-harness/src/slicer-test-harness.ts:185
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 | Default type |
---|---|
T extends OpAPI | any |
Parameters
Parameter | Type |
---|---|
name | string |
Returns
T
getOperationAPI()
getOperationAPI<
T
>(name
):T
Defined in: teraslice-test-harness/src/slicer-test-harness.ts:193
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 | Default type |
---|---|
T extends APICore <APIConfig > | APICore <APIConfig > |
Parameters
Parameter | Type |
---|---|
name | string |
Returns
T
initialize()
initialize(
recoveryData
):Promise
<void
>
Defined in: teraslice-test-harness/src/slicer-test-harness.ts:52
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
makeContextConfig()
protected
makeContextConfig(job
,assets
,cluster_manager_type
):Promise
<ExecutionContextConfig
>
Defined in: teraslice-test-harness/src/base-test-harness.ts:53
Parameters
Parameter | Type | Default value |
---|---|---|
job | JobConfigParams | undefined |
assets | string [] | ... |
cluster_manager_type | ClusterManagerType | 'native' |
Returns
Promise
<ExecutionContextConfig
>
Inherited from
onSliceComplete()
onSliceComplete(
result
):void
Defined in: teraslice-test-harness/src/slicer-test-harness.ts:173
Parameters
Parameter | Type |
---|---|
result | SliceResult |
Returns
void
onSliceDispatch()
onSliceDispatch(
slice
):void
Defined in: teraslice-test-harness/src/slicer-test-harness.ts:169
Parameters
Parameter | Type |
---|---|
slice | Slice |
Returns
void
setClients()
setClients(
clients
):void
Defined in: teraslice-test-harness/src/base-test-harness.ts:49
Parameters
Parameter | Type |
---|---|
clients | TestClientConfig [] |
Returns
void
Inherited from
setWorkers()
setWorkers(
count
):void
Defined in: teraslice-test-harness/src/slicer-test-harness.ts:163
Parameters
Parameter | Type |
---|---|
count | number |
Returns
void
shutdown()
shutdown():
Promise
<void
>
Defined in: teraslice-test-harness/src/slicer-test-harness.ts:203
Shutdown the Operations on the ExecutionContext
Returns
Promise
<void
>
Overrides
slicer()
slicer<
T
>():T
Defined in: teraslice-test-harness/src/slicer-test-harness.ts:44
Type Parameters
Type Parameter | Default type |
---|---|
T extends SlicerCore <OpConfig > | SlicerCore <OpConfig > |
Returns
T