/**
* Copyright Microsoft Corporation. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
///
import child_process from 'child_process';
import { EventEmitter } from 'events';
import { RunPayload } from './ipc';
import { Config } from './config';
import { Reporter } from './reporter';
import { RunnerSuite } from './runnerTest';
export declare class Dispatcher {
private _workers;
private _freeWorkers;
private _workerClaimers;
private _testById;
private _queue;
private _stopCallback;
readonly _config: Config;
private _suite;
private _reporter;
private _hasWorkerErrors;
private _isStopped;
private _failureCount;
constructor(suite: RunnerSuite, config: Config, reporter: Reporter);
_filesSortedByWorkerHash(): RunPayload[];
run(): Promise;
_dispatchQueue(): Promise;
_runJob(worker: Worker, runPayload: RunPayload): Promise;
_obtainWorker(): Promise;
_notifyWorkerClaimer(): Promise;
_createWorker(): Promise;
stop(): Promise;
private _reportTestEnd;
hasWorkerErrors(): boolean;
}
declare class Worker extends EventEmitter {
process: child_process.ChildProcess;
runner: Dispatcher;
hash: string;
index: number;
stdout: any[];
stderr: any[];
constructor(runner: Dispatcher);
init(): Promise;
run(entry: RunPayload): void;
stop(): void;
}
export {};
//# sourceMappingURL=dispatcher.d.ts.map