Author: adietish
Date: 2010-12-15 05:23:59 -0500 (Wed, 15 Dec 2010)
New Revision: 27499
Modified:
trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/core/job/CloudSchedulingRulesTest.java
Log:
[JBIDE-7594]
* corrected scheduling rules to have correct blocking across the scheduling class
hierarchy
* created #createSecurePasswordStore to be able to fake store in tests
* created tests for all scheduling rules
Modified:
trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/core/job/CloudSchedulingRulesTest.java
===================================================================
---
trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/core/job/CloudSchedulingRulesTest.java 2010-12-15
10:21:59 UTC (rev 27498)
+++
trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/core/job/CloudSchedulingRulesTest.java 2010-12-15
10:23:59 UTC (rev 27499)
@@ -50,7 +50,7 @@
}
@Test
- public void instanceRule2CloudElementInstanceRule() throws DeltaCloudException {
+ public void instanceRule2CloudElementInstancesRule() throws DeltaCloudException {
InstanceSchedulingRule instanceRule = new InstanceSchedulingRule(
cloudFake, AbstractCloudElementJob.CLOUDELEMENT.INSTANCES, deltaCloudInstanceFake);
CloudElementSchedulingRule cloudRule =
@@ -59,7 +59,7 @@
}
@Test
- public void instanceRule2CloudElementImageRule() throws DeltaCloudException {
+ public void instanceRule2CloudElementImagesRule() throws DeltaCloudException {
InstanceSchedulingRule instanceRule =
new InstanceSchedulingRule(cloudFake, CLOUDELEMENT.INSTANCES,
deltaCloudInstanceFake);
CloudElementSchedulingRule cloudRule = new CloudElementSchedulingRule(cloudFake,
CLOUDELEMENT.IMAGES);
@@ -72,17 +72,18 @@
new InstanceSchedulingRule(cloudFake, CLOUDELEMENT.INSTANCES,
deltaCloudInstanceFake);
CloudSchedulingRule cloudRule = new CloudSchedulingRule(cloudFake);
assertTrue(instanceRule.isConflicting(cloudRule));
+ assertTrue(cloudRule.isConflicting(instanceRule));
}
@Test
- public void cloudInstancesRule2CloudInstancesRule() throws DeltaCloudException {
+ public void cloudElementInstancesRule2CloudInstancesRule() throws DeltaCloudException {
CloudElementSchedulingRule cloudInstancesRule =
new CloudElementSchedulingRule(cloudFake, CLOUDELEMENT.INSTANCES);
assertTrue(cloudInstancesRule.isConflicting(cloudInstancesRule));
}
@Test
- public void cloudInstancesRule2CloudImageRule() throws DeltaCloudException {
+ public void cloudElementInstancesRule2CloudImageRule() throws DeltaCloudException {
CloudElementSchedulingRule cloudInstancesRule =
new CloudElementSchedulingRule(cloudFake, CLOUDELEMENT.INSTANCES);
CloudElementSchedulingRule cloudImagesRule =
@@ -91,7 +92,7 @@
}
@Test
- public void cloudInstancesRule2CloudRule() throws DeltaCloudException {
+ public void cloudElementInstancesRule2CloudRule() throws DeltaCloudException {
CloudElementSchedulingRule cloudInstancesRule =
new CloudElementSchedulingRule(cloudFake, CLOUDELEMENT.INSTANCES);
CloudSchedulingRule cloudRule = new CloudSchedulingRule(cloudFake);
@@ -99,7 +100,7 @@
}
@Test
- public void cloudImagesRule2CloudImagesRule() throws DeltaCloudException {
+ public void cloudElementImagesRule2CloudImagesRule() throws DeltaCloudException {
CloudElementSchedulingRule cloudImagesRule =
new CloudElementSchedulingRule(cloudFake, CLOUDELEMENT.IMAGES);
assertTrue(cloudImagesRule.isConflicting(cloudImagesRule));
Show replies by date