@@ -65,7 +65,7 @@ def test_execute_command_against_correct_db_on_successful_initialization(
6565 "mock_multi_db_config,mock_db, mock_db1, mock_db2" ,
6666 [
6767 (
68- {"initial_health_check_policy" : InitialHealthCheck .MAJORITY_HEALTHY },
68+ {"initial_health_check_policy" : InitialHealthCheck .MAJORITY_AVAILABLE },
6969 {"weight" : 0.2 , "circuit" : {"state" : CBState .CLOSED }},
7070 {"weight" : 0.5 , "circuit" : {"state" : CBState .CLOSED }},
7171 {"weight" : 0.7 , "circuit" : {"state" : CBState .OPEN }},
@@ -519,7 +519,9 @@ def mock_check_health(database):
519519 ):
520520 # With skip_unhealthy=False, should raise exception
521521 with pytest .raises (UnhealthyDatabaseException ):
522- client .add_database (new_db_config , skip_unhealthy = False )
522+ client .add_database (
523+ new_db_config , skip_initial_health_check = False
524+ )
523525
524526 # Database list should remain unchanged
525527 assert len (client .get_databases ()) == 2
@@ -797,7 +799,7 @@ def test_all_healthy_policy_succeeds_when_all_databases_healthy(
797799 "mock_multi_db_config,mock_db, mock_db1, mock_db2" ,
798800 [
799801 (
800- {"initial_health_check_policy" : InitialHealthCheck .ALL_HEALTHY },
802+ {"initial_health_check_policy" : InitialHealthCheck .ALL_AVAILABLE },
801803 {"weight" : 0.2 , "circuit" : {"state" : CBState .CLOSED }},
802804 {"weight" : 0.7 , "circuit" : {"state" : CBState .CLOSED }},
803805 {"weight" : 0.5 , "circuit" : {"state" : CBState .CLOSED }},
@@ -837,7 +839,7 @@ def mock_check_health(database):
837839 "mock_multi_db_config,mock_db, mock_db1, mock_db2" ,
838840 [
839841 (
840- {"initial_health_check_policy" : InitialHealthCheck .MAJORITY_HEALTHY },
842+ {"initial_health_check_policy" : InitialHealthCheck .MAJORITY_AVAILABLE },
841843 {"weight" : 0.2 , "circuit" : {"state" : CBState .CLOSED }},
842844 {"weight" : 0.7 , "circuit" : {"state" : CBState .CLOSED }},
843845 {"weight" : 0.5 , "circuit" : {"state" : CBState .CLOSED }},
@@ -876,7 +878,7 @@ def mock_check_health(database):
876878 "mock_multi_db_config,mock_db, mock_db1, mock_db2" ,
877879 [
878880 (
879- {"initial_health_check_policy" : InitialHealthCheck .MAJORITY_HEALTHY },
881+ {"initial_health_check_policy" : InitialHealthCheck .MAJORITY_AVAILABLE },
880882 {"weight" : 0.2 , "circuit" : {"state" : CBState .CLOSED }},
881883 {"weight" : 0.7 , "circuit" : {"state" : CBState .CLOSED }},
882884 {"weight" : 0.5 , "circuit" : {"state" : CBState .CLOSED }},
@@ -917,7 +919,7 @@ def mock_check_health(database):
917919 "mock_multi_db_config,mock_db, mock_db1, mock_db2" ,
918920 [
919921 (
920- {"initial_health_check_policy" : InitialHealthCheck .ANY_HEALTHY },
922+ {"initial_health_check_policy" : InitialHealthCheck .ONE_AVAILABLE },
921923 {"weight" : 0.2 , "circuit" : {"state" : CBState .CLOSED }},
922924 {"weight" : 0.7 , "circuit" : {"state" : CBState .CLOSED }},
923925 {"weight" : 0.5 , "circuit" : {"state" : CBState .CLOSED }},
@@ -955,7 +957,7 @@ def mock_check_health(database):
955957 "mock_multi_db_config,mock_db, mock_db1, mock_db2" ,
956958 [
957959 (
958- {"initial_health_check_policy" : InitialHealthCheck .ANY_HEALTHY },
960+ {"initial_health_check_policy" : InitialHealthCheck .ONE_AVAILABLE },
959961 {"weight" : 0.2 , "circuit" : {"state" : CBState .CLOSED }},
960962 {"weight" : 0.7 , "circuit" : {"state" : CBState .CLOSED }},
961963 {"weight" : 0.5 , "circuit" : {"state" : CBState .CLOSED }},
0 commit comments