@@ -52,6 +52,7 @@ Integration::Integration()
5252 , is_with_vnodes_(false )
5353 , is_randomized_contact_points_(false )
5454 , is_schema_metadata_(false )
55+ , is_ccm_requested_(true )
5556 , is_ccm_start_requested_(true )
5657 , is_ccm_start_node_individually_(false )
5758 , is_session_requested_(true )
@@ -138,47 +139,49 @@ void Integration::SetUp() {
138139 data_center_nodes.push_back (number_dc1_nodes_);
139140 data_center_nodes.push_back (number_dc2_nodes_);
140141
141- try {
142- // Create and start the CCM cluster (if not already created)
143- ccm_ = new CCM::Bridge (
144- server_version_, Options::use_git (), Options::branch_tag (), Options::use_install_dir (),
145- Options::install_dir (), Options::is_dse (), dse_workload_, Options::cluster_prefix (),
146- Options::dse_credentials (), Options::dse_username (), Options::dse_password (),
147- Options::deployment_type (), Options::authentication_type (), Options::host (),
148- Options::port (), Options::username (), Options::password (), Options::public_key (),
149- Options::private_key (), Options::is_verbose_ccm ());
150- if (ccm_->create_cluster (data_center_nodes, is_with_vnodes_, is_password_authenticator_,
151- is_ssl_, is_client_authentication_)) {
152- if (is_ccm_start_requested_) {
153- if (is_ccm_start_node_individually_) {
154- for (unsigned short node = 1 ; node <= (number_dc1_nodes_ + number_dc2_nodes_); ++node) {
142+ if (is_ccm_requested_) {
143+ try {
144+ // Create and start the CCM cluster (if not already created)
145+ ccm_ = new CCM::Bridge (
146+ server_version_, Options::use_git (), Options::branch_tag (), Options::use_install_dir (),
147+ Options::install_dir (), Options::is_dse (), dse_workload_, Options::cluster_prefix (),
148+ Options::dse_credentials (), Options::dse_username (), Options::dse_password (),
149+ Options::deployment_type (), Options::authentication_type (), Options::host (),
150+ Options::port (), Options::username (), Options::password (), Options::public_key (),
151+ Options::private_key (), Options::is_verbose_ccm ());
152+ if (ccm_->create_cluster (data_center_nodes, is_with_vnodes_, is_password_authenticator_,
153+ is_ssl_, is_client_authentication_)) {
154+ if (is_ccm_start_requested_) {
155+ if (is_ccm_start_node_individually_) {
156+ for (unsigned short node = 1 ; node <= (number_dc1_nodes_ + number_dc2_nodes_); ++node) {
157+ if (is_password_authenticator_) {
158+ ccm_->start_node (node, " -Dcassandra.superuser_setup_delay_ms=0" );
159+ } else {
160+ ccm_->start_node (node);
161+ }
162+ }
163+ } else {
155164 if (is_password_authenticator_) {
156- ccm_->start_node (node, " -Dcassandra.superuser_setup_delay_ms=0" );
165+ ccm_->start_cluster ( " -Dcassandra.superuser_setup_delay_ms=0" );
157166 } else {
158- ccm_->start_node (node );
167+ ccm_->start_cluster ( );
159168 }
160169 }
161- } else {
162- if (is_password_authenticator_) {
163- ccm_->start_cluster (" -Dcassandra.superuser_setup_delay_ms=0" );
164- } else {
165- ccm_->start_cluster ();
166- }
167170 }
168171 }
169- }
170172
171- // Generate the default contact points
172- contact_points_ =
173- generate_contact_points (ccm_->get_ip_prefix (), number_dc1_nodes_ + number_dc2_nodes_);
173+ // Generate the default contact points
174+ contact_points_ =
175+ generate_contact_points (ccm_->get_ip_prefix (), number_dc1_nodes_ + number_dc2_nodes_);
174176
175- // Determine if the session connection should be established
176- if (is_session_requested_ && is_ccm_start_requested_) {
177- connect ();
177+ // Determine if the session connection should be established
178+ if (is_session_requested_ && is_ccm_start_requested_) {
179+ connect ();
180+ }
181+ } catch (CCM::BridgeException be) {
182+ // Issue creating the CCM bridge instance (force failure)
183+ FAIL () << be.what ();
178184 }
179- } catch (CCM::BridgeException be) {
180- // Issue creating the CCM bridge instance (force failure)
181- FAIL () << be.what ();
182185 }
183186}
184187
0 commit comments