@@ -329,10 +329,10 @@ TEST_F(ClusterUnitTest, Simple) {
329329 mockssandra::SimpleCluster cluster (simple (), 3 );
330330 ASSERT_EQ (cluster.start_all (), 0 );
331331
332- ContactPointList contact_points;
333- contact_points.push_back (" 127.0.0.1" );
334- contact_points.push_back (" 127.0.0.2" );
335- contact_points.push_back (" 127.0.0.3" );
332+ AddressVec contact_points;
333+ contact_points.push_back (Address ( " 127.0.0.1" , 9042 ) );
334+ contact_points.push_back (Address ( " 127.0.0.2" , 9042 ) );
335+ contact_points.push_back (Address ( " 127.0.0.3" , 9042 ) );
336336
337337 Future::Ptr connect_future (new Future ());
338338 ClusterConnector::Ptr connector (
@@ -363,13 +363,13 @@ TEST_F(ClusterUnitTest, SimpleWithCriticalFailures) {
363363 .then (mockssandra::Action::Builder ().plaintext_auth ())
364364 .auth_success ();
365365
366- ContactPointList contact_points;
367- contact_points.push_back (" 127.0.0.1" ); // Good
368- contact_points.push_back (" 127.0.0.2" ); // Invalid auth
366+ AddressVec contact_points;
367+ contact_points.push_back (Address ( " 127.0.0.1" , 9042 ) ); // Good
368+ contact_points.push_back (Address ( " 127.0.0.2" , 9042 ) ); // Invalid auth
369369 add_logging_critera (" Unable to connect to host 127.0.0.2 because of the "
370370 " following error: Received error response 'Invalid "
371371 " credentials'" );
372- contact_points.push_back (" 127.0.0.3" ); // Invalid protocol
372+ contact_points.push_back (Address ( " 127.0.0.3" , 9042 ) ); // Invalid protocol
373373 add_logging_critera (" Unable to connect to host 127.0.0.3 because of the "
374374 " following error: Received error response 'Invalid or "
375375 " unsupported protocol version'" );
@@ -399,8 +399,8 @@ TEST_F(ClusterUnitTest, Resolve) {
399399 mockssandra::SimpleCluster cluster (simple (), 3 );
400400 ASSERT_EQ (cluster.start_all (), 0 );
401401
402- ContactPointList contact_points;
403- contact_points.push_back (" localhost" );
402+ AddressVec contact_points;
403+ contact_points.push_back (Address ( " localhost" , 9042 ) );
404404
405405 Future::Ptr connect_future (new Future ());
406406 ClusterConnector::Ptr connector (
@@ -416,8 +416,8 @@ TEST_F(ClusterUnitTest, Auth) {
416416 mockssandra::SimpleCluster cluster (auth ());
417417 ASSERT_EQ (cluster.start_all (), 0 );
418418
419- ContactPointList contact_points;
420- contact_points.push_back (" 127.0.0.1" );
419+ AddressVec contact_points;
420+ contact_points.push_back (Address ( " 127.0.0.1" , 9042 ) );
421421
422422 Future::Ptr connect_future (new Future ());
423423 ClusterConnector::Ptr connector (
@@ -440,8 +440,8 @@ TEST_F(ClusterUnitTest, Ssl) {
440440 settings.control_connection_settings .connection_settings = use_ssl (&cluster);
441441 ASSERT_EQ (cluster.start_all (), 0 );
442442
443- ContactPointList contact_points;
444- contact_points.push_back (" 127.0.0.1" );
443+ AddressVec contact_points;
444+ contact_points.push_back (Address ( " 127.0.0.1" , 9042 ) );
445445
446446 Future::Ptr connect_future (new Future ());
447447 ClusterConnector::Ptr connector (
@@ -461,10 +461,10 @@ TEST_F(ClusterUnitTest, Cancel) {
461461 Vector<Future::Ptr> connect_futures;
462462 Vector<ClusterConnector::Ptr> connectors;
463463
464- ContactPointList contact_points;
465- contact_points.push_back (" localhost" );
466- contact_points.push_back (" google.com" );
467- contact_points.push_back (" doesnotexist.dne" );
464+ AddressVec contact_points;
465+ contact_points.push_back (Address ( " localhost" , 9042 ) );
466+ contact_points.push_back (Address ( " google.com" , 9042 ) );
467+ contact_points.push_back (Address ( " doesnotexist.dne" , 9042 ) );
468468
469469 for (size_t i = 0 ; i < 10 ; ++i) {
470470 Future::Ptr connect_future (new Future ());
@@ -507,8 +507,8 @@ TEST_F(ClusterUnitTest, ReconnectToDiscoveredHosts) {
507507 outage_plan.start_node (1 );
508508 outage_plan.stop_node (3 );
509509
510- ContactPointList contact_points;
511- contact_points.push_back (" 127.0.0.1" );
510+ AddressVec contact_points;
511+ contact_points.push_back (Address ( " 127.0.0.1" , 9042 ) );
512512
513513 Future::Ptr close_future (new Future ());
514514 Future::Ptr connect_future (new Future ());
@@ -550,8 +550,8 @@ TEST_F(ClusterUnitTest, ReconnectUpdateHosts) {
550550 outage_plan.stop_node (3 );
551551 outage_plan.stop_node (1 );
552552
553- ContactPointList contact_points;
554- contact_points.push_back (" 127.0.0.1" );
553+ AddressVec contact_points;
554+ contact_points.push_back (Address ( " 127.0.0.1" , 9042 ) );
555555
556556 Future::Ptr close_future (new Future ());
557557 Future::Ptr connect_future (new Future ());
@@ -590,8 +590,8 @@ TEST_F(ClusterUnitTest, CloseDuringReconnect) {
590590 mockssandra::SimpleCluster mock_cluster (simple ());
591591 mock_cluster.start_all ();
592592
593- ContactPointList contact_points;
594- contact_points.push_back (" 127.0.0.1" );
593+ AddressVec contact_points;
594+ contact_points.push_back (Address ( " 127.0.0.1" , 9042 ) );
595595
596596 Future::Ptr close_future (new Future ());
597597 Future::Ptr connect_future (new Future ());
@@ -623,8 +623,8 @@ TEST_F(ClusterUnitTest, NotifyDownUp) {
623623 mockssandra::SimpleCluster mock_cluster (simple (), 3 );
624624 mock_cluster.start_all ();
625625
626- ContactPointList contact_points;
627- contact_points.push_back (" 127.0.0.1" );
626+ AddressVec contact_points;
627+ contact_points.push_back (Address ( " 127.0.0.1" , 9042 ) );
628628
629629 Future::Ptr close_future (new Future ());
630630 Future::Ptr connect_future (new Future ());
@@ -666,8 +666,8 @@ TEST_F(ClusterUnitTest, ProtocolNegotiation) {
666666 mockssandra::SimpleCluster cluster (builder.build ());
667667 ASSERT_EQ (cluster.start_all (), 0 );
668668
669- ContactPointList contact_points;
670- contact_points.push_back (" 127.0.0.1" );
669+ AddressVec contact_points;
670+ contact_points.push_back (Address ( " 127.0.0.1" , 9042 ) );
671671
672672 Future::Ptr connect_future (new Future ());
673673 ClusterConnector::Ptr connector (
@@ -688,8 +688,8 @@ TEST_F(ClusterUnitTest, NoSupportedProtocols) {
688688 mockssandra::SimpleCluster cluster (builder.build ());
689689 ASSERT_EQ (cluster.start_all (), 0 );
690690
691- ContactPointList contact_points;
692- contact_points.push_back (" 127.0.0.1" );
691+ AddressVec contact_points;
692+ contact_points.push_back (Address ( " 127.0.0.1" , 9042 ) );
693693
694694 Future::Ptr connect_future (new Future ());
695695 ClusterConnector::Ptr connector (
@@ -707,10 +707,10 @@ TEST_F(ClusterUnitTest, FindValidHost) {
707707 mockssandra::SimpleCluster cluster (simple (), 3 );
708708 ASSERT_EQ (cluster.start_all (), 0 );
709709
710- ContactPointList contact_points;
711- contact_points.push_back (" 127.99.99.1" ); // Invalid
712- contact_points.push_back (" 127.99.99.2" ); // Invalid
713- contact_points.push_back (" 127.0.0.1" );
710+ AddressVec contact_points;
711+ contact_points.push_back (Address ( " 127.99.99.1" , 9042 ) ); // Invalid
712+ contact_points.push_back (Address ( " 127.99.99.2" , 9042 ) ); // Invalid
713+ contact_points.push_back (Address ( " 127.0.0.1" , 9042 ) );
714714
715715 Future::Ptr connect_future (new Future ());
716716 ClusterConnector::Ptr connector (
@@ -730,10 +730,10 @@ TEST_F(ClusterUnitTest, NoHostsAvailable) {
730730 // Don't start the cluster
731731
732732 // Try multiple hosts
733- ContactPointList contact_points;
734- contact_points.push_back (" 127.0.0.1" );
735- contact_points.push_back (" 127.0.0.2" );
736- contact_points.push_back (" 127.0.0.3" );
733+ AddressVec contact_points;
734+ contact_points.push_back (Address ( " 127.0.0.1" , 9042 ) );
735+ contact_points.push_back (Address ( " 127.0.0.2" , 9042 ) );
736+ contact_points.push_back (Address ( " 127.0.0.3" , 9042 ) );
737737
738738 Future::Ptr connect_future (new Future ());
739739 ClusterConnector::Ptr connector (
@@ -751,8 +751,8 @@ TEST_F(ClusterUnitTest, InvalidAuth) {
751751 mockssandra::SimpleCluster cluster (auth ());
752752 ASSERT_EQ (cluster.start_all (), 0 );
753753
754- ContactPointList contact_points;
755- contact_points.push_back (" 127.0.0.1" );
754+ AddressVec contact_points;
755+ contact_points.push_back (Address ( " 127.0.0.1" , 9042 ) );
756756
757757 Future::Ptr connect_future (new Future ());
758758 ClusterConnector::Ptr connector (
@@ -775,8 +775,8 @@ TEST_F(ClusterUnitTest, InvalidSsl) {
775775 use_ssl (&cluster);
776776 ASSERT_EQ (cluster.start_all (), 0 );
777777
778- ContactPointList contact_points;
779- contact_points.push_back (" 127.0.0.1" );
778+ AddressVec contact_points;
779+ contact_points.push_back (Address ( " 127.0.0.1" , 9042 ) );
780780
781781 Future::Ptr connect_future (new Future ());
782782 ClusterConnector::Ptr connector (
@@ -803,8 +803,8 @@ TEST_F(ClusterUnitTest, DCAwareRecoverOnRemoteHost) {
803803 Address local_address (" 127.0.0.1" , 9042 );
804804 Address remote_address (" 127.0.0.2" , 9042 );
805805
806- ContactPointList contact_points;
807- contact_points.push_back (local_address. to_string () );
806+ AddressVec contact_points;
807+ contact_points.push_back (local_address);
808808
809809 Future::Ptr close_future (new Future ());
810810 Future::Ptr connect_future (new Future ());
@@ -858,8 +858,8 @@ TEST_F(ClusterUnitTest, InvalidDC) {
858858 mockssandra::SimpleCluster cluster (simple ());
859859 ASSERT_EQ (cluster.start_all (), 0 );
860860
861- ContactPointList contact_points;
862- contact_points.push_back (" 127.0.0.1" );
861+ AddressVec contact_points;
862+ contact_points.push_back (Address ( " 127.0.0.1" , 9042 ) );
863863
864864 Future::Ptr connect_future (new Future ());
865865 ClusterConnector::Ptr connector (
@@ -886,8 +886,8 @@ TEST_F(ClusterUnitTest, DisableEventsOnStartup) {
886886 mockssandra::SimpleCluster cluster (simple (), 2 );
887887 ASSERT_EQ (cluster.start_all (), 0 );
888888
889- ContactPointList contact_points;
890- contact_points.push_back (" 127.0.0.1" );
889+ AddressVec contact_points;
890+ contact_points.push_back (Address ( " 127.0.0.1" , 9042 ) );
891891
892892 Future::Ptr connect_future (new Future ());
893893 ClusterConnector::Ptr connector (
@@ -929,8 +929,8 @@ TEST_F(ClusterUnitTest, ReconnectionPolicy) {
929929 outage_plan.stop_node (1 );
930930 outage_plan.start_node (1 );
931931
932- ContactPointList contact_points;
933- contact_points.push_back (" 127.0.0.1" );
932+ AddressVec contact_points;
933+ contact_points.push_back (Address ( " 127.0.0.1" , 9042 ) );
934934
935935 Future::Ptr close_future (new Future ());
936936 Future::Ptr connect_future (new Future ());
0 commit comments