| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 8818c30 commit efb2833
11 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -276,6 +276,7 @@ def __init__( | |||
| 276 | 276 | options=[ | |
| 277 | 277 | ("grpc.max_send_message_length", -1), | |
| 278 | 278 | ("grpc.max_receive_message_length", -1), | |
| 279 | + ("grpc.keepalive_time_ms", 120000), | ||
| 279 | 280 | ], | |
| 280 | 281 | ) | |
| 281 | 282 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -325,6 +325,7 @@ def __init__( | |||
| 325 | 325 | options=[ | |
| 326 | 326 | ("grpc.max_send_message_length", -1), | |
| 327 | 327 | ("grpc.max_receive_message_length", -1), | |
| 328 | + ("grpc.keepalive_time_ms", 120000), | ||
| 328 | 329 | ], | |
| 329 | 330 | ) | |
| 330 | 331 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -285,6 +285,7 @@ def __init__( | |||
| 285 | 285 | options=[ | |
| 286 | 286 | ("grpc.max_send_message_length", -1), | |
| 287 | 287 | ("grpc.max_receive_message_length", -1), | |
| 288 | + ("grpc.keepalive_time_ms", 120000), | ||
| 288 | 289 | ], | |
| 289 | 290 | ) | |
| 290 | 291 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -334,6 +334,7 @@ def __init__( | |||
| 334 | 334 | options=[ | |
| 335 | 335 | ("grpc.max_send_message_length", -1), | |
| 336 | 336 | ("grpc.max_receive_message_length", -1), | |
| 337 | + ("grpc.keepalive_time_ms", 120000), | ||
| 337 | 338 | ], | |
| 338 | 339 | ) | |
| 339 | 340 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -267,6 +267,7 @@ def __init__( | |||
| 267 | 267 | options=[ | |
| 268 | 268 | ("grpc.max_send_message_length", -1), | |
| 269 | 269 | ("grpc.max_receive_message_length", -1), | |
| 270 | + ("grpc.keepalive_time_ms", 120000), | ||
| 270 | 271 | ], | |
| 271 | 272 | ) | |
| 272 | 273 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -315,6 +315,7 @@ def __init__( | |||
| 315 | 315 | options=[ | |
| 316 | 316 | ("grpc.max_send_message_length", -1), | |
| 317 | 317 | ("grpc.max_receive_message_length", -1), | |
| 318 | + ("grpc.keepalive_time_ms", 120000), | ||
| 318 | 319 | ], | |
| 319 | 320 | ) | |
| 320 | 321 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -17,6 +17,7 @@ | |||
| 17 | 17 | from pathlib import Path | |
| 18 | 18 | import shutil | |
| 19 | 19 | from typing import List, Optional | |
| 20 | + import re | ||
| 20 | 21 | ||
| 21 | 22 | import synthtool as s | |
| 22 | 23 | from synthtool import gcp | |
@@ -185,6 +186,22 @@ def get_staging_dirs( | |||
| 185 | 186 | )""" | |
| 186 | 187 | ) | |
| 187 | 188 | ||
| 189 | + count = s.replace( | ||
| 190 | + [ | ||
| 191 | + library / "google/cloud/spanner_v1/services/*/transports/grpc*", | ||
| 192 | + library / "tests/unit/gapic/spanner_v1/*", | ||
| 193 | + ], | ||
| 194 | + "^\s+options=\\[.*?\\]", | ||
| 195 | + """options=[ | ||
| 196 | + ("grpc.max_send_message_length", -1), | ||
| 197 | + ("grpc.max_receive_message_length", -1), | ||
| 198 | + ("grpc.keepalive_time_ms", 120000), | ||
| 199 | + ]""", | ||
| 200 | + flags=re.MULTILINE | re.DOTALL, | ||
| 201 | + ) | ||
| 202 | + if count < 1: | ||
| 203 | + raise Exception("Expected replacements for gRPC channel options not made.") | ||
| 204 | + | ||
| 188 | 205 | s.move( | |
| 189 | 206 | library, | |
| 190 | 207 | excludes=[ | |
@@ -201,6 +218,21 @@ def get_staging_dirs( | |||
| 201 | 218 | for library in get_staging_dirs( | |
| 202 | 219 | spanner_admin_instance_default_version, "spanner_admin_instance" | |
| 203 | 220 | ): | |
| 221 | + count = s.replace( | ||
| 222 | + [ | ||
| 223 | + library / "google/cloud/spanner_admin_instance_v1/services/*/transports/grpc*", | ||
| 224 | + library / "tests/unit/gapic/spanner_admin_instance_v1/*", | ||
| 225 | + ], | ||
| 226 | + "^\s+options=\\[.*?\\]", | ||
| 227 | + """options=[ | ||
| 228 | + ("grpc.max_send_message_length", -1), | ||
| 229 | + ("grpc.max_receive_message_length", -1), | ||
| 230 | + ("grpc.keepalive_time_ms", 120000), | ||
| 231 | + ]""", | ||
| 232 | + flags=re.MULTILINE | re.DOTALL, | ||
| 233 | + ) | ||
| 234 | + if count < 1: | ||
| 235 | + raise Exception("Expected replacements for gRPC channel options not made.") | ||
| 204 | 236 | s.move( | |
| 205 | 237 | library, | |
| 206 | 238 | excludes=["google/cloud/spanner_admin_instance/**", "*.*", "docs/index.rst", "noxfile.py", "**/gapic_version.py", "testing/constraints-3.7.txt",], | |
@@ -209,6 +241,21 @@ def get_staging_dirs( | |||
| 209 | 241 | for library in get_staging_dirs( | |
| 210 | 242 | spanner_admin_database_default_version, "spanner_admin_database" | |
| 211 | 243 | ): | |
| 244 | + count = s.replace( | ||
| 245 | + [ | ||
| 246 | + library / "google/cloud/spanner_admin_database_v1/services/*/transports/grpc*", | ||
| 247 | + library / "tests/unit/gapic/spanner_admin_database_v1/*", | ||
| 248 | + ], | ||
| 249 | + "^\s+options=\\[.*?\\]", | ||
| 250 | + """options=[ | ||
| 251 | + ("grpc.max_send_message_length", -1), | ||
| 252 | + ("grpc.max_receive_message_length", -1), | ||
| 253 | + ("grpc.keepalive_time_ms", 120000), | ||
| 254 | + ]""", | ||
| 255 | + flags=re.MULTILINE | re.DOTALL, | ||
| 256 | + ) | ||
| 257 | + if count < 1: | ||
| 258 | + raise Exception("Expected replacements for gRPC channel options not made.") | ||
| 212 | 259 | s.move( | |
| 213 | 260 | library, | |
| 214 | 261 | excludes=["google/cloud/spanner_admin_database/**", "*.*", "docs/index.rst", "noxfile.py", "**/gapic_version.py", "testing/constraints-3.7.txt",], | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1136,6 +1136,7 @@ def test_database_admin_client_create_channel_credentials_file( | |||
| 1136 | 1136 | options=[ | |
| 1137 | 1137 | ("grpc.max_send_message_length", -1), | |
| 1138 | 1138 | ("grpc.max_receive_message_length", -1), | |
| 1139 | + ("grpc.keepalive_time_ms", 120000), | ||
| 1139 | 1140 | ], | |
| 1140 | 1141 | ) | |
| 1141 | 1142 | ||
@@ -23315,6 +23316,7 @@ def test_database_admin_transport_create_channel(transport_class, grpc_helpers): | |||
| 23315 | 23316 | options=[ | |
| 23316 | 23317 | ("grpc.max_send_message_length", -1), | |
| 23317 | 23318 | ("grpc.max_receive_message_length", -1), | |
| 23319 | + ("grpc.keepalive_time_ms", 120000), | ||
| 23318 | 23320 | ], | |
| 23319 | 23321 | ) | |
| 23320 | 23322 | ||
@@ -23347,6 +23349,7 @@ def test_database_admin_grpc_transport_client_cert_source_for_mtls(transport_cla | |||
| 23347 | 23349 | options=[ | |
| 23348 | 23350 | ("grpc.max_send_message_length", -1), | |
| 23349 | 23351 | ("grpc.max_receive_message_length", -1), | |
| 23352 | + ("grpc.keepalive_time_ms", 120000), | ||
| 23350 | 23353 | ], | |
| 23351 | 23354 | ) | |
| 23352 | 23355 | ||
@@ -23593,6 +23596,7 @@ def test_database_admin_transport_channel_mtls_with_client_cert_source(transport | |||
| 23593 | 23596 | options=[ | |
| 23594 | 23597 | ("grpc.max_send_message_length", -1), | |
| 23595 | 23598 | ("grpc.max_receive_message_length", -1), | |
| 23599 | + ("grpc.keepalive_time_ms", 120000), | ||
| 23596 | 23600 | ], | |
| 23597 | 23601 | ) | |
| 23598 | 23602 | assert transport.grpc_channel == mock_grpc_channel | |
@@ -23640,6 +23644,7 @@ def test_database_admin_transport_channel_mtls_with_adc(transport_class): | |||
| 23640 | 23644 | options=[ | |
| 23641 | 23645 | ("grpc.max_send_message_length", -1), | |
| 23642 | 23646 | ("grpc.max_receive_message_length", -1), | |
| 23647 | + ("grpc.keepalive_time_ms", 120000), | ||
| 23643 | 23648 | ], | |
| 23644 | 23649 | ) | |
| 23645 | 23650 | assert transport.grpc_channel == mock_grpc_channel | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1125,6 +1125,7 @@ def test_instance_admin_client_create_channel_credentials_file( | |||
| 1125 | 1125 | options=[ | |
| 1126 | 1126 | ("grpc.max_send_message_length", -1), | |
| 1127 | 1127 | ("grpc.max_receive_message_length", -1), | |
| 1128 | + ("grpc.keepalive_time_ms", 120000), | ||
| 1128 | 1129 | ], | |
| 1129 | 1130 | ) | |
| 1130 | 1131 | ||
@@ -18621,6 +18622,7 @@ def test_instance_admin_transport_create_channel(transport_class, grpc_helpers): | |||
| 18621 | 18622 | options=[ | |
| 18622 | 18623 | ("grpc.max_send_message_length", -1), | |
| 18623 | 18624 | ("grpc.max_receive_message_length", -1), | |
| 18625 | + ("grpc.keepalive_time_ms", 120000), | ||
| 18624 | 18626 | ], | |
| 18625 | 18627 | ) | |
| 18626 | 18628 | ||
@@ -18653,6 +18655,7 @@ def test_instance_admin_grpc_transport_client_cert_source_for_mtls(transport_cla | |||
| 18653 | 18655 | options=[ | |
| 18654 | 18656 | ("grpc.max_send_message_length", -1), | |
| 18655 | 18657 | ("grpc.max_receive_message_length", -1), | |
| 18658 | + ("grpc.keepalive_time_ms", 120000), | ||
| 18656 | 18659 | ], | |
| 18657 | 18660 | ) | |
| 18658 | 18661 | ||
@@ -18881,6 +18884,7 @@ def test_instance_admin_transport_channel_mtls_with_client_cert_source(transport | |||
| 18881 | 18884 | options=[ | |
| 18882 | 18885 | ("grpc.max_send_message_length", -1), | |
| 18883 | 18886 | ("grpc.max_receive_message_length", -1), | |
| 18887 | + ("grpc.keepalive_time_ms", 120000), | ||
| 18884 | 18888 | ], | |
| 18885 | 18889 | ) | |
| 18886 | 18890 | assert transport.grpc_channel == mock_grpc_channel | |
@@ -18928,6 +18932,7 @@ def test_instance_admin_transport_channel_mtls_with_adc(transport_class): | |||
| 18928 | 18932 | options=[ | |
| 18929 | 18933 | ("grpc.max_send_message_length", -1), | |
| 18930 | 18934 | ("grpc.max_receive_message_length", -1), | |
| 18935 | + ("grpc.keepalive_time_ms", 120000), | ||
| 18931 | 18936 | ], | |
| 18932 | 18937 | ) | |
| 18933 | 18938 | assert transport.grpc_channel == mock_grpc_channel | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1066,6 +1066,7 @@ def test_spanner_client_create_channel_credentials_file( | |||
| 1066 | 1066 | options=[ | |
| 1067 | 1067 | ("grpc.max_send_message_length", -1), | |
| 1068 | 1068 | ("grpc.max_receive_message_length", -1), | |
| 1069 | + ("grpc.keepalive_time_ms", 120000), | ||
| 1069 | 1070 | ], | |
| 1070 | 1071 | ) | |
| 1071 | 1072 | ||
@@ -12180,6 +12181,7 @@ def test_spanner_transport_create_channel(transport_class, grpc_helpers): | |||
| 12180 | 12181 | options=[ | |
| 12181 | 12182 | ("grpc.max_send_message_length", -1), | |
| 12182 | 12183 | ("grpc.max_receive_message_length", -1), | |
| 12184 | + ("grpc.keepalive_time_ms", 120000), | ||
| 12183 | 12185 | ], | |
| 12184 | 12186 | ) | |
| 12185 | 12187 | ||
@@ -12209,6 +12211,7 @@ def test_spanner_grpc_transport_client_cert_source_for_mtls(transport_class): | |||
| 12209 | 12211 | options=[ | |
| 12210 | 12212 | ("grpc.max_send_message_length", -1), | |
| 12211 | 12213 | ("grpc.max_receive_message_length", -1), | |
| 12214 | + ("grpc.keepalive_time_ms", 120000), | ||
| 12212 | 12215 | ], | |
| 12213 | 12216 | ) | |
| 12214 | 12217 | ||
@@ -12419,6 +12422,7 @@ def test_spanner_transport_channel_mtls_with_client_cert_source(transport_class) | |||
| 12419 | 12422 | options=[ | |
| 12420 | 12423 | ("grpc.max_send_message_length", -1), | |
| 12421 | 12424 | ("grpc.max_receive_message_length", -1), | |
| 12425 | + ("grpc.keepalive_time_ms", 120000), | ||
| 12422 | 12426 | ], | |
| 12423 | 12427 | ) | |
| 12424 | 12428 | assert transport.grpc_channel == mock_grpc_channel | |
@@ -12463,6 +12467,7 @@ def test_spanner_transport_channel_mtls_with_adc(transport_class): | |||
| 12463 | 12467 | options=[ | |
| 12464 | 12468 | ("grpc.max_send_message_length", -1), | |
| 12465 | 12469 | ("grpc.max_receive_message_length", -1), | |
| 12470 | + ("grpc.keepalive_time_ms", 120000), | ||
| 12466 | 12471 | ], | |
| 12467 | 12472 | ) | |
| 12468 | 12473 | assert transport.grpc_channel == mock_grpc_channel | |
| Back | FazBrowse Home | New Git URL |
0 commit comments