@@ -160,11 +160,6 @@ class TestConfigGenerator : public mysqlrouter::ConfigGenerator {
160
160
}
161
161
};
162
162
163
- const std::string kDefaultConnectTimeout =
164
- std::to_string (mysqlrouter::MySQLSession::kDefaultConnectTimeout );
165
- const std::string kDefaultReadTimeout =
166
- std::to_string (mysqlrouter::MySQLSession::kDefaultReadTimeout );
167
-
168
163
class ReplayerWithMockSSL : public MySQLSessionReplayer {
169
164
public:
170
165
void set_ssl_options (mysql_ssl_mode ssl_mode, const std::string &tls_version,
@@ -1602,8 +1597,8 @@ TEST_F(CreateConfigGeneratorTest, create_config_basic) {
1602
1597
" [DEFAULT]" ,
1603
1598
" name=myrouter" ,
1604
1599
" user=mysqlrouter" ,
1605
- " connect_timeout=" + kDefaultConnectTimeout ,
1606
- " read_timeout=" + kDefaultReadTimeout ,
1600
+ " connect_timeout=5 " ,
1601
+ " read_timeout=30 " ,
1607
1602
" dynamic_state=state_file_name.json" ,
1608
1603
" client_ssl_cert=" + tmp_path.join (" router-cert.pem" ).str (),
1609
1604
" client_ssl_key=" + tmp_path.join (" router-key.pem" ).str (),
@@ -1690,8 +1685,8 @@ TEST_F(CreateConfigGeneratorTest, create_config_system_instance) {
1690
1685
std::vector<std::string> expected_config_lines = {
1691
1686
" # File automatically generated during MySQL Router bootstrap" ,
1692
1687
" [DEFAULT]" ,
1693
- " connect_timeout=" + kDefaultConnectTimeout ,
1694
- " read_timeout=" + kDefaultReadTimeout ,
1688
+ " connect_timeout=5 " ,
1689
+ " read_timeout=30 " ,
1695
1690
" dynamic_state=state_file_name.json" ,
1696
1691
" client_ssl_cert=" + tmp_path.join (" router-cert.pem" ).str (),
1697
1692
" client_ssl_key=" + tmp_path.join (" router-key.pem" ).str (),
@@ -1781,8 +1776,8 @@ TEST_F(CreateConfigGeneratorTest, create_config_base_port) {
1781
1776
std::vector<std::string> expected_config_lines = {
1782
1777
" # File automatically generated during MySQL Router bootstrap" ,
1783
1778
" [DEFAULT]" ,
1784
- " connect_timeout=" + kDefaultConnectTimeout ,
1785
- " read_timeout=" + kDefaultReadTimeout ,
1779
+ " connect_timeout=5 " ,
1780
+ " read_timeout=30 " ,
1786
1781
" dynamic_state=state_file_name.json" ,
1787
1782
" client_ssl_cert=" + tmp_path.join (" router-cert.pem" ).str (),
1788
1783
" client_ssl_key=" + tmp_path.join (" router-key.pem" ).str (),
@@ -1876,8 +1871,8 @@ TEST_F(CreateConfigGeneratorTest, create_config_skip_tcp) {
1876
1871
std::vector<std::string> expected_config_lines = {
1877
1872
" # File automatically generated during MySQL Router bootstrap" ,
1878
1873
" [DEFAULT]" ,
1879
- " connect_timeout=" + kDefaultConnectTimeout ,
1880
- " read_timeout=" + kDefaultReadTimeout ,
1874
+ " connect_timeout=5 " ,
1875
+ " read_timeout=30 " ,
1881
1876
" dynamic_state=state_file_name.json" ,
1882
1877
" client_ssl_cert=" + tmp_path.join (" router-cert.pem" ).str (),
1883
1878
" client_ssl_key=" + tmp_path.join (" router-key.pem" ).str (),
@@ -1964,8 +1959,8 @@ TEST_F(CreateConfigGeneratorTest, create_config_use_sockets) {
1964
1959
std::vector<std::string> expected_config_lines = {
1965
1960
" # File automatically generated during MySQL Router bootstrap" ,
1966
1961
" [DEFAULT]" ,
1967
- " connect_timeout=" + kDefaultConnectTimeout ,
1968
- " read_timeout=" + kDefaultReadTimeout ,
1962
+ " connect_timeout=5 " ,
1963
+ " read_timeout=30 " ,
1969
1964
" dynamic_state=state_file_name.json" ,
1970
1965
" client_ssl_cert=" + tmp_path.join (" router-cert.pem" ).str (),
1971
1966
" client_ssl_key=" + tmp_path.join (" router-key.pem" ).str (),
@@ -2062,8 +2057,8 @@ TEST_F(CreateConfigGeneratorTest, create_config_bind_address) {
2062
2057
" [DEFAULT]" ,
2063
2058
" name=myrouter" ,
2064
2059
" user=mysqlrouter" ,
2065
- " connect_timeout=" + kDefaultConnectTimeout ,
2066
- " read_timeout=" + kDefaultReadTimeout ,
2060
+ " connect_timeout=5 " ,
2061
+ " read_timeout=30 " ,
2067
2062
" dynamic_state=state_file_name.json" ,
2068
2063
" client_ssl_cert=" + tmp_path.join (" router-cert.pem" ).str (),
2069
2064
" client_ssl_key=" + tmp_path.join (" router-key.pem" ).str (),
@@ -2155,8 +2150,8 @@ TEST_F(CreateConfigGeneratorTest, create_config_disable_rest) {
2155
2150
" [DEFAULT]" ,
2156
2151
" name=myrouter" ,
2157
2152
" user=mysqlrouter" ,
2158
- " connect_timeout=" + kDefaultConnectTimeout ,
2159
- " read_timeout=" + kDefaultReadTimeout ,
2153
+ " connect_timeout=5 " ,
2154
+ " read_timeout=30 " ,
2160
2155
" dynamic_state=state_file_name.json" ,
2161
2156
" client_ssl_cert=" + tmp_path.join (" router-cert.pem" ).str (),
2162
2157
" client_ssl_key=" + tmp_path.join (" router-key.pem" ).str (),
0 commit comments