Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
constructor(op) {
this.context = new TestContext('teraslice-op-test-harness');
this.schema = jobSchema(this.context);
this.events = this.context.apis.foundation.getSystemEvents();
this.logger = this.context.logger;
this.operationFn = op;
// This is for backwards compatiblity
this._jobSpec = executionSpec;
bindThis(this, TestHarness);
}
constructor(job: JobConfig, options: JobHarnessOptions) {
const context = new TestContext(`job-harness:${job.name}`);
context.assignment = options.assignment || Assignment.Worker;
const jobSchema = makeJobSchema(context);
const executionConfig = validateJobConfig(jobSchema, job) as ExecutionConfig;
this.context = makeExecutionContext({
context,
executionConfig
});
}
constructor(job: JobConfig, options: JobHarnessOptions, assignment: Assignment) {
const testName = [assignment, job.name].filter((s) => s).join(':');
this.context = new TestContext(testName, {
assignment,
clients: options.clients,
});
this.events = this.context.apis.foundation.getSystemEvents();
const config = this.makeContextConfig(job, options.assetDir);
this.executionContext = makeExecutionContext(config) as U;
}