Author: adietish
Date: 2010-12-15 05:26:31 -0500 (Wed, 15 Dec 2010)
New Revision: 27500
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:23:59 UTC (rev 27499)
+++
trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/core/job/CloudSchedulingRulesTest.java 2010-12-15
10:26:31 UTC (rev 27500)
@@ -56,6 +56,7 @@
CloudElementSchedulingRule cloudRule =
new CloudElementSchedulingRule(cloudFake, CLOUDELEMENT.INSTANCES);
assertTrue(instanceRule.isConflicting(cloudRule));
+ assertTrue(cloudRule.isConflicting(instanceRule));
}
@Test
@@ -64,6 +65,7 @@
new InstanceSchedulingRule(cloudFake, CLOUDELEMENT.INSTANCES,
deltaCloudInstanceFake);
CloudElementSchedulingRule cloudRule = new CloudElementSchedulingRule(cloudFake,
CLOUDELEMENT.IMAGES);
assertFalse(instanceRule.isConflicting(cloudRule));
+ assertFalse(cloudRule.isConflicting(instanceRule));
}
@Test
@@ -89,6 +91,7 @@
CloudElementSchedulingRule cloudImagesRule =
new CloudElementSchedulingRule(cloudFake, CLOUDELEMENT.IMAGES);
assertFalse(cloudInstancesRule.isConflicting(cloudImagesRule));
+ assertFalse(cloudImagesRule.isConflicting(cloudInstancesRule));
}
@Test
@@ -97,6 +100,7 @@
new CloudElementSchedulingRule(cloudFake, CLOUDELEMENT.INSTANCES);
CloudSchedulingRule cloudRule = new CloudSchedulingRule(cloudFake);
assertTrue(cloudInstancesRule.isConflicting(cloudRule));
+ assertTrue(cloudRule.isConflicting(cloudInstancesRule));
}
@Test