Skip to content

Commit 523f3b3

Browse files
Ensure that the internal defaults match the external defaults!
1 parent f990b92 commit 523f3b3

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

src/oracledb/impl/base/connect_params.pyx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,8 @@ _tnsnames_files = {}
6464
# internal default values
6565
cdef str DEFAULT_PROTOCOL = "tcp"
6666
cdef uint32_t DEFAULT_PORT = 1521
67-
cdef double DEFAULT_TCP_CONNECT_TIMEOUT = 60
67+
cdef double DEFAULT_TCP_CONNECT_TIMEOUT = 20
68+
cdef uint32_t DEFAULT_RETRY_DELAY = 1
6869
cdef uint32_t DEFAULT_SDU = 8192
6970

7071

@@ -795,6 +796,7 @@ cdef class Description(ConnectParamsNode):
795796
def __init__(self):
796797
ConnectParamsNode.__init__(self, True)
797798
self.tcp_connect_timeout = DEFAULT_TCP_CONNECT_TIMEOUT
799+
self.retry_delay = DEFAULT_RETRY_DELAY
798800
self.ssl_server_dn_match = True
799801
self.sdu = DEFAULT_SDU
800802

tests/test_4500_connect_params.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -441,6 +441,7 @@ def test_4527(self):
441441
host=host,
442442
service_name=service_name,
443443
tcp_connect_timeout=in_val,
444+
retry_delay=0,
444445
)
445446
tcp_timeout_val = f"(TRANSPORT_CONNECT_TIMEOUT={out_val})"
446447
connect_string = (
@@ -517,6 +518,7 @@ def test_4531(self):
517518
for in_val, has_section in options:
518519
connect_string = f"""
519520
(DESCRIPTION=
521+
(RETRY_DELAY=0)
520522
(SOURCE_ROUTE={in_val})
521523
(ADDRESS=(PROTOCOL=tcp)(HOST=host1)(PORT=1521))
522524
(ADDRESS=(PROTOCOL=tcp)(HOST=host2)(PORT=1522))

0 commit comments

Comments
 (0)