kikocis/java-driver public
Changesets · Branches · Tags · Compare
| Changeset | d8c184a6e782ed7503df8d3d66ae62d5f88b2be6f36de890a8dc7feec08ee6fd |
|---|---|
| Author | Andrew Tolbert <andrew.tolbert@datastax.com> · 2015-01-30 18:19 -06:00 |
| Committer | Andrew Tolbert <andrew.tolbert@datastax.com> · 2015-02-13 07:23 -06:00 |
| Parents | a5cf2157144a |
1 file changed
modified driver-core/src/test/java/com/datastax/driver/core/PoolingOptionsTest.java +4 −3
| @@ -48,8 +48,9 @@ | ||
| 48 | 48 | .hasState(State.UP) |
| 49 | 49 | .isAtDistance(HostDistance.LOCAL); |
| 50 | 50 | // Wait for the node to be up, because apparently on Jenkins it's still only ADDED when we reach this line |
| 51 | + // Waiting for NEW_NODE_DELAY_SECONDS+1 allows the driver to create a connection pool and mark the node up | |
| 51 | 52 | assertThat(cluster).host(2) |
| 52 | - .comesUpWithin(120, SECONDS) | |
| 53 | + .comesUpWithin(Cluster.NEW_NODE_DELAY_SECONDS+1, SECONDS) | |
| 53 | 54 | .isAtDistance(HostDistance.LOCAL); |
| 54 | 55 | |
| 55 | 56 | // Bring host 3 up, its presence should be acknowledged but it should be ignored |
| @@ -63,13 +64,13 @@ | ||
| 63 | 64 | .hasState(State.UP) |
| 64 | 65 | .isAtDistance(HostDistance.LOCAL); |
| 65 | 66 | assertThat(cluster).host(3) |
| 66 | - .comesUpWithin(120, SECONDS) | |
| 67 | + .comesUpWithin(Cluster.NEW_NODE_DELAY_SECONDS+1, SECONDS) | |
| 67 | 68 | .isAtDistance(HostDistance.IGNORED); |
| 68 | 69 | assertThat(session).hasNoPoolFor(3); |
| 69 | 70 | |
| 70 | 71 | // Kill host 2, host 3 should take its place |
| 71 | 72 | ccm.stop(2); |
| 72 | - TestUtils.waitFor(CCMBridge.ipOfNode(3), cluster, 120); | |
| 73 | + TestUtils.waitFor(CCMBridge.ipOfNode(3), cluster); | |
| 73 | 74 | |
| 74 | 75 | assertThat(cluster).host(1) |
| 75 | 76 | .hasState(State.UP) |