File tree Expand file tree Collapse file tree 2 files changed +14
-4
lines changed
driver-core/src/test/java/com/datastax/driver/core Expand file tree Collapse file tree 2 files changed +14
-4
lines changed Original file line number Diff line number Diff line change 2222import java .util .concurrent .atomic .AtomicInteger ;
2323
2424import com .google .common .base .Function ;
25- import com .google .common .collect .Collections2 ;
2625import com .google .common .collect .HashMultiset ;
2726import com .google .common .collect .Maps ;
2827import org .slf4j .Logger ;
2928import org .slf4j .LoggerFactory ;
3029import org .testng .annotations .Test ;
3130
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 ;
3333
3434import com .datastax .driver .core .policies .DelegatingLoadBalancingPolicy ;
3535import com .datastax .driver .core .policies .LoadBalancingPolicy ;
@@ -111,6 +111,7 @@ public void should_reestablish_if_control_node_decommissioned() throws Interrupt
111111
112112 cluster = Cluster .builder ()
113113 .addContactPoint (CCMBridge .ipOfNode (1 ))
114+ .withQueryOptions (nonDebouncingQueryOptions ())
114115 .build ();
115116 cluster .init ();
116117
Original file line number Diff line number Diff line change 2020import org .slf4j .Logger ;
2121import org .slf4j .LoggerFactory ;
2222import org .testng .annotations .AfterMethod ;
23+ import org .testng .annotations .BeforeMethod ;
2324import org .testng .annotations .Test ;
2425
2526
@@ -143,6 +144,14 @@ public void should_ignore_node_that_does_not_support_protocol_version_on_session
143144 .isNotReconnectingFromDown ();
144145 }
145146
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+
146155 @ AfterMethod (groups = "long" )
147156 public void teardown () {
148157 if (mainCluster != null )
@@ -164,8 +173,8 @@ private static int countUpHosts(Cluster cluster) {
164173 }
165174
166175 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 ;
169178
170179 for (int i = 0 ; i <= maxRetries ; i ++) {
171180 int actualCount = countUpHosts (cluster );
You can’t perform that action at this time.
0 commit comments