public async Task DefaultPlacementShouldBeRandom() { await this.HostedCluster.WaitForLivenessToStabilizeAsync(); logger.Info("********************** Starting the test DefaultPlacementShouldBeRandom ******************************"); TestSilosStarted(2); Assert.Equal( RandomPlacement.Singleton, PlacementStrategy.GetDefault()); }
public async Task DefaultPlacementShouldBeRandom() { await WaitForLivenessToStabilizeAsync(); logger.Info("********************** Starting the test DefaultPlacementShouldBeRandom ******************************"); TestSilosStarted(2); Assert.AreEqual( RandomPlacement.Singleton, PlacementStrategy.GetDefault(), "The default placement strategy is expected to be random."); }
public static void CreatePlacementDirectorsManager(GlobalConfiguration globalConfig) { Instance = new PlacementDirectorsManager(); Instance.Register <RandomPlacement, RandomPlacementDirector>(); Instance.Register <PreferLocalPlacement, PreferLocalPlacementDirector>(); Instance.Register <StatelessWorkerPlacement, StatelessWorkerDirector>(); Instance.Register <ActivationCountBasedPlacement, ActivationCountPlacementDirector>(); var acDirector = (ActivationCountPlacementDirector)Instance.directors[typeof(ActivationCountBasedPlacement)]; acDirector.Initialize(globalConfig); defaultPlacementStrategy = PlacementStrategy.GetDefault(); }