|
24 | 24 | import com.datastax.oss.driver.api.core.metadata.Node; |
25 | 25 | import com.datastax.oss.driver.api.core.metadata.NodeStateListener; |
26 | 26 | import com.datastax.oss.driver.api.core.metadata.token.TokenRange; |
27 | | -import com.datastax.oss.driver.api.testinfra.ScyllaSkip; |
| 27 | +import com.datastax.oss.driver.api.testinfra.ccm.CcmBridge; |
28 | 28 | import com.datastax.oss.driver.api.testinfra.ccm.CustomCcmRule; |
29 | 29 | import com.datastax.oss.driver.api.testinfra.session.SessionUtils; |
30 | 30 | import com.datastax.oss.driver.internal.core.pool.ChannelPool; |
|
33 | 33 | import java.util.Map; |
34 | 34 | import java.util.Set; |
35 | 35 | import java.util.concurrent.TimeUnit; |
| 36 | +import org.junit.Before; |
36 | 37 | import org.junit.ClassRule; |
37 | 38 | import org.junit.Test; |
38 | 39 |
|
39 | | -@ScyllaSkip(description = "@IntegrationTestDisabledFlaky") |
40 | 40 | public class RemovedNodeIT { |
41 | 41 |
|
42 | 42 | @ClassRule |
43 | 43 | public static final CustomCcmRule CCM_RULE = |
44 | 44 | CustomCcmRule.builder() |
45 | 45 | // We need 4 nodes to run this test against DSE, because it requires at least 3 nodes to |
46 | 46 | // maintain RF=3 for keyspace system_distributed |
47 | | - .withNodes(4) |
| 47 | + // |
| 48 | + // To avoid issue with flakiness of this test (scylladb/java-driver/issues/393) we start |
| 49 | + // with 1 node and manually start 3 more nodes with initial_token explicitly set. |
| 50 | + .withNodes(1) |
48 | 51 | .build(); |
49 | 52 |
|
| 53 | + @Before |
| 54 | + public void setup() { |
| 55 | + CcmBridge ccmBridge = CCM_RULE.getCcmBridge(); |
| 56 | + for (int nodeId = 2; nodeId <= 4; nodeId++) { |
| 57 | + ccmBridge.addWithoutStart(nodeId, "dc1"); |
| 58 | + ccmBridge.updateNodeConfig(nodeId, "initial_token", String.valueOf(nodeId * 100)); |
| 59 | + ccmBridge.start(nodeId); |
| 60 | + } |
| 61 | + } |
| 62 | + |
50 | 63 | @Test |
51 | 64 | public void should_signal_and_destroy_pool_when_node_gets_removed() { |
52 | 65 | RemovalListener removalListener = new RemovalListener(); |
|
0 commit comments