kikocis/java-driver public
Changesets · Branches · Tags · Compare
| Changeset | 2c287791e3c875f91400cd8e557a39f1c2b7446d74d47d7b39ad1708f24d053b |
|---|---|
| Author | olim7t <omichallat+github@gmail.com> · 2014-10-16 11:01 +02:00 |
| Committer | olim7t <omichallat+github@gmail.com> · 2014-10-16 11:01 +02:00 |
| Parents | d7be58e9b867 |
1 file changed
modified driver-core/src/test/java/com/datastax/driver/core/PoolingOptionsTest.java +4 −2
| @@ -1,7 +1,8 @@ | ||
| 1 | 1 | package com.datastax.driver.core; |
| 2 | 2 | |
| 3 | -import org.mockito.Mockito; | |
| 3 | +import static java.util.concurrent.TimeUnit.SECONDS; | |
| 4 | 4 | |
| 5 | +import org.mockito.Mockito; | |
| 5 | 6 | import org.testng.annotations.Test; |
| 6 | 7 | |
| 7 | 8 | import com.datastax.driver.core.Host.State; |
| @@ -46,8 +47,9 @@ | ||
| 46 | 47 | assertThat(cluster).host(1) |
| 47 | 48 | .hasState(State.UP) |
| 48 | 49 | .isAtDistance(HostDistance.LOCAL); |
| 50 | + // Wait for the node to be up, because apparently on Jenkins it's still only ADDED when we reach this line | |
| 49 | 51 | assertThat(cluster).host(2) |
| 50 | - .hasState(State.UP) | |
| 52 | + .comesUpWithin(20, SECONDS) | |
| 51 | 53 | .isAtDistance(HostDistance.LOCAL); |
| 52 | 54 | |
| 53 | 55 | // Bring host 3 up, its presence should be acknowledged but it should be ignored |