Browse files

increase delay, fishing for a race condition

  • Loading branch information...
1 parent 7b9a5f1 commit 113661ec5b494e6577bc5595c85ac5e18707d8b7 @pidster pidster committed Feb 11, 2013
View
11 src/main/java/org/vertx/java/test/utils/DeploymentUtils.java
@@ -57,6 +57,7 @@
for (TestVerticle v : verticles) {
DeploymentHandler doneHandler = new DeploymentHandler(latch);
+ handlers.put(v, doneHandler);
JsonObject config = getJsonConfig(v.jsonConfig());
URL[] classpath = findVerticleURLs(v);
@@ -65,22 +66,28 @@
// we are having to set null here which is not that clever
String includes = ("".equals(v.includes())) ? null : v.includes();
+
try {
if (v.worker()) {
platformManager.deployWorkerVerticle(v.multiThreaded(), v.main(), config, classpath, v.instances(), includes, doneHandler);
}
else {
platformManager.deployVerticle(v.main(), config, classpath, v.instances(), includes, doneHandler);
}
- handlers.put(v, doneHandler);
} catch (Throwable e) {
e.printStackTrace();
LOG.log(Level.WARNING, String.format("Problem deploying (%s) %n", v), e);
- latch.countDown();
}
+ finally {
+ //
+ }
+ System.out.println("latch: " + latch.getCount());
}
+ System.out.println("latch: " + latch.getCount());
+
await(latch);
+
// await(latch, timeout); // Eh?
Set<Entry<TestVerticle, DeploymentHandler>> entrySet = handlers.entrySet();
View
2 src/test/java/org/vertx/java/test/junit/ModuleMethodRuleTest.java
@@ -47,7 +47,7 @@
public void setup() {
this.timeout = Long.parseLong(System.getProperty("vertx.test.timeout", "15L"));
try {
- Thread.sleep(1000L);
+ Thread.sleep(1000L); // FIXME this sucks
} catch (InterruptedException e) {
//
}
View
2 src/test/java/org/vertx/java/test/junit/SimpleEchoTest.java
@@ -63,7 +63,7 @@ public void handle(Message<String> event) {
}});
try {
- Thread.sleep(1000L);
+ Thread.sleep(1000L); // FIXME this sucks
} catch (InterruptedException e) {
//
}
View
2 src/test/java/org/vertx/java/test/junit/VerticleMethodRuleTest.java
@@ -51,7 +51,7 @@ public Vertx getVertx() {
public void setup() {
this.timeout = Long.parseLong(System.getProperty("vertx.test.timeout", "15L"));
try {
- Thread.sleep(2000L);
+ Thread.sleep(1000L); // FIXME this sucks
} catch (InterruptedException e) {
//
}

0 comments on commit 113661e

Please sign in to comment.