kikocis/java-driver public
Changesets · Branches · Tags · Compare
| Changeset | 968015a12f3bf01137f6b1bd9278ef84d68951106851d510a5ea066a53d88865 |
|---|---|
| Author | Andrew Tolbert <andrew.tolbert@datastax.com> · 2015-08-18 22:31 -05:00 |
| Committer | olim7t <omichallat+github@gmail.com> · 2015-08-20 15:18 +02:00 |
| Parents | f8ced6fc4e9a |
2 files changed
modified driver-core/src/test/java/com/datastax/driver/core/ControlConnectionTest.java +3 −2
| @@ -22,14 +22,14 @@ | ||
| 22 | 22 | import java.util.concurrent.atomic.AtomicInteger; |
| 23 | 23 | |
| 24 | 24 | import com.google.common.base.Function; |
| 25 | -import com.google.common.collect.Collections2; | |
| 26 | 25 | import com.google.common.collect.HashMultiset; |
| 27 | 26 | import com.google.common.collect.Maps; |
| 28 | 27 | import org.slf4j.Logger; |
| 29 | 28 | import org.slf4j.LoggerFactory; |
| 30 | 29 | import org.testng.annotations.Test; |
| 31 | 30 | |
| 32 | -import static org.assertj.core.api.Assertions.assertThat; | |
| 31 | +import static com.datastax.driver.core.Assertions.assertThat; | |
| 32 | +import static com.datastax.driver.core.TestUtils.nonDebouncingQueryOptions; | |
| 33 | 33 | |
| 34 | 34 | import com.datastax.driver.core.policies.DelegatingLoadBalancingPolicy; |
| 35 | 35 | import com.datastax.driver.core.policies.LoadBalancingPolicy; |
| @@ -111,6 +111,7 @@ | ||
| 111 | 111 | |
| 112 | 112 | cluster = Cluster.builder() |
| 113 | 113 | .addContactPoint(CCMBridge.ipOfNode(1)) |
| 114 | + .withQueryOptions(nonDebouncingQueryOptions()) | |
| 114 | 115 | .build(); |
| 115 | 116 | cluster.init(); |
| 116 | 117 |
modified driver-core/src/test/java/com/datastax/driver/core/RecommissionedNodeTest.java +11 −2
| @@ -20,6 +20,7 @@ | ||
| 20 | 20 | import org.slf4j.Logger; |
| 21 | 21 | import org.slf4j.LoggerFactory; |
| 22 | 22 | import org.testng.annotations.AfterMethod; |
| 23 | +import org.testng.annotations.BeforeMethod; | |
| 23 | 24 | import org.testng.annotations.Test; |
| 24 | 25 | |
| 25 | 26 | |
| @@ -143,6 +144,14 @@ | ||
| 143 | 144 | .isNotReconnectingFromDown(); |
| 144 | 145 | } |
| 145 | 146 | |
| 147 | + @BeforeMethod(groups = "long") | |
| 148 | + public void clearFields() { | |
| 149 | + // Clear cluster and ccm instances between tests. | |
| 150 | + mainCluster = null; | |
| 151 | + mainCcm = null; | |
| 152 | + otherCcm = null; | |
| 153 | + } | |
| 154 | + | |
| 146 | 155 | @AfterMethod(groups = "long") |
| 147 | 156 | public void teardown() { |
| 148 | 157 | if (mainCluster != null) |
| @@ -164,8 +173,8 @@ | ||
| 164 | 173 | } |
| 165 | 174 | |
| 166 | 175 | private static void waitForCountUpHosts(Cluster cluster, int expectedCount) throws InterruptedException { |
| 167 | - int maxRetries = 30; | |
| 168 | - int interval = 10; | |
| 176 | + int maxRetries = 10; | |
| 177 | + int interval = 6; | |
| 169 | 178 | |
| 170 | 179 | for (int i = 0; i <= maxRetries; i++) { |
| 171 | 180 | int actualCount = countUpHosts(cluster); |