Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlyn Normington2011-11-23 06:56:14 -0500
committerGlyn Normington2011-11-23 06:56:14 -0500
commit563aca2f30539f0328490b901811e9544993217a (patch)
tree98d16f7557ec2b28018e8ba64c0d57a143cbe98c /org.eclipse.virgo.kernel.deployer.test/src/test/java
parent6113a34cc2c6a869481832437727d0522f00ab9c (diff)
downloadorg.eclipse.virgo.kernel-563aca2f30539f0328490b901811e9544993217a.tar.gz
org.eclipse.virgo.kernel-563aca2f30539f0328490b901811e9544993217a.tar.xz
org.eclipse.virgo.kernel-563aca2f30539f0328490b901811e9544993217a.zip
The heisenbug came back. Hopefully these changes will nail it...
Diffstat (limited to 'org.eclipse.virgo.kernel.deployer.test/src/test/java')
-rw-r--r--org.eclipse.virgo.kernel.deployer.test/src/test/java/org/eclipse/virgo/kernel/deployer/test/FactoryConfigurationDeploymentTests.java16
1 files changed, 9 insertions, 7 deletions
diff --git a/org.eclipse.virgo.kernel.deployer.test/src/test/java/org/eclipse/virgo/kernel/deployer/test/FactoryConfigurationDeploymentTests.java b/org.eclipse.virgo.kernel.deployer.test/src/test/java/org/eclipse/virgo/kernel/deployer/test/FactoryConfigurationDeploymentTests.java
index 073fe7e0..5b349209 100644
--- a/org.eclipse.virgo.kernel.deployer.test/src/test/java/org/eclipse/virgo/kernel/deployer/test/FactoryConfigurationDeploymentTests.java
+++ b/org.eclipse.virgo.kernel.deployer.test/src/test/java/org/eclipse/virgo/kernel/deployer/test/FactoryConfigurationDeploymentTests.java
@@ -138,7 +138,7 @@ public class FactoryConfigurationDeploymentTests extends AbstractDeployerIntegra
assertNotNull(deploymentIdentity);
// let it deploy
- sleep(1000);
+ sleep(100);
assertEquals(1, countFactoryConfigurations("test.factory.pid.a"));
assertEquals(1, service.updateCount());
@@ -151,8 +151,7 @@ public class FactoryConfigurationDeploymentTests extends AbstractDeployerIntegra
this.appDeployer.undeploy(deploymentIdentity);
// give time for events to percolate
- sleep(1000);
-
+ sleep(100);
assertEquals(0, countFactoryConfigurations("test.factory.pid.a"));
assertEquals(1, service.updateCount());
assertEquals(1, service.deleteCount());
@@ -196,6 +195,8 @@ public class FactoryConfigurationDeploymentTests extends AbstractDeployerIntegra
writePropertiesFile(hotDeployConfiguration, target, "no comment");
ConfigurationTestUtils.pollUntilFactoryInConfigurationAdmin(this.configAdmin, factoryPid);
+ // let events propagate
+ sleep(100);
assertEquals(1, countFactoryConfigurations(factoryPid));
assertEquals(1, service.updateCount());
assertEquals(0, service.deleteCount());
@@ -208,7 +209,8 @@ public class FactoryConfigurationDeploymentTests extends AbstractDeployerIntegra
// remove the file and let it be removed
target.delete();
ConfigurationTestUtils.pollUntilFactoryNotInConfigurationAdmin(this.configAdmin, factoryPid);
-
+ // let events propagate
+ sleep(100);
assertEquals(0, countFactoryConfigurations(factoryPid));
assertEquals(1, service.updateCount());
assertEquals(1, service.deleteCount());
@@ -250,7 +252,7 @@ public class FactoryConfigurationDeploymentTests extends AbstractDeployerIntegra
ConfigurationTestUtils.pollUntilFactoryInConfigurationAdmin(this.configAdmin, factoryPid);
// let events propagate
- sleep(1000);
+ sleep(100);
assertEquals(1, countFactoryConfigurations(factoryPid));
assertEquals(1, service.updateCount());
assertEquals(0, service.deleteCount());
@@ -266,7 +268,7 @@ public class FactoryConfigurationDeploymentTests extends AbstractDeployerIntegra
writePropertiesFile(hotDeployConfiguration, target, "updated");
// let events propagate and update happen
- sleep(2501);
+ sleep(4001);
assertEquals(1, countFactoryConfigurations(factoryPid));
assertEquals(2, service.updateCount()); // This takes several seconds to change from 1 to 2
assertEquals(0, service.deleteCount());
@@ -356,7 +358,7 @@ public class FactoryConfigurationDeploymentTests extends AbstractDeployerIntegra
assertEquals("1", propertiesFromService.get("prop2"));
writePropertiesFile(configTwo, targetTwo, "initial");
- sleep(2502);
+ sleep(4002);
assertEquals(2, countFactoryConfigurations(factoryPid));
assertEquals(2, service.updateCount());
assertEquals(0, service.deleteCount());

Back to the top