public static void Use(bfgCluster testCluster, bfgWorkerManager workerManager) { if (testCluster != null) { _testCluster = testCluster; } if (workerManager != null) { TestArenaWorkerManager = workerManager; // new bfgWorkerManager(_testCluster); } }
public static IDisposable StartTestArena(string[] args, IObservable <StartUnitTest[]> testCfg, bfgCluster cluster, bfgWorkerManager workerManager, IRxnManager <IRxn> toFireOn, IAppServiceDiscovery discovery) { "Starting up TestArena".LogDebug(); if (_started.HasValue) { _started = DateTime.Now; } var stopAdvertising = bfgTestArenaApi.AdvertiseForWorkers(discovery, "all", $"http://{RxnApp.GetIpAddress()}:888"); theBfg.Use(cluster, workerManager); var stopWorkers = Disposable.Empty; if (args.Any(a => a.BasicallyEquals("fire"))) { stopWorkers = theBfg.StartTestArenaWorkers(args, testCfg).Until(); } var stopFiring = StartFiringWorkflow(args, testCfg, toFireOn); return(new CompositeDisposable(stopAdvertising, stopWorkers, stopFiring)); }