Search in sources :

Example 86 with ChocoScheduler

use of org.btrplace.scheduler.choco.ChocoScheduler in project scheduler by btrplace.

the class FixedSizePartitioningTest method basicTesting.

@Test
public void basicTesting() {
    FixedSizePartitioning f = new FixedSizePartitioning(1000);
    f.setWorkersCount(5);
    Assert.assertEquals(f.getWorkersCount(), 5);
    Assert.assertEquals(f.getSize(), 1000);
    ChocoScheduler cra = new DefaultChocoScheduler();
    cra.setInstanceSolver(f);
    Assert.assertEquals(cra.getInstanceSolver(), f);
    f.setSize(300);
    Assert.assertEquals(f.getSize(), 300);
    Assert.assertEquals(f.randomPickUp(), false);
}
Also used : DefaultChocoScheduler(org.btrplace.scheduler.choco.DefaultChocoScheduler) ChocoScheduler(org.btrplace.scheduler.choco.ChocoScheduler) DefaultChocoScheduler(org.btrplace.scheduler.choco.DefaultChocoScheduler) Test(org.testng.annotations.Test)

Aggregations

ChocoScheduler (org.btrplace.scheduler.choco.ChocoScheduler)86 DefaultChocoScheduler (org.btrplace.scheduler.choco.DefaultChocoScheduler)86 Test (org.testng.annotations.Test)80 ReconfigurationPlan (org.btrplace.plan.ReconfigurationPlan)76 DefaultModel (org.btrplace.model.DefaultModel)66 Model (org.btrplace.model.Model)66 Node (org.btrplace.model.Node)64 VM (org.btrplace.model.VM)63 SatConstraint (org.btrplace.model.constraint.SatConstraint)52 ArrayList (java.util.ArrayList)47 Mapping (org.btrplace.model.Mapping)37 ShareableResource (org.btrplace.model.view.ShareableResource)32 Fence (org.btrplace.model.constraint.Fence)18 HashSet (java.util.HashSet)17 Preserve (org.btrplace.model.constraint.Preserve)12 ShutdownVM (org.btrplace.plan.event.ShutdownVM)12 Collection (java.util.Collection)11 MigrateVM (org.btrplace.plan.event.MigrateVM)10 Running (org.btrplace.model.constraint.Running)8 BootVM (org.btrplace.plan.event.BootVM)8