Skip to content

Commit 1eef432

Browse files
mattdeekayJesse Whitehouse
andauthored
Fix socket timeout test (#144)
Signed-off-by: Jesse Whitehouse <[email protected]> Co-authored-by: Jesse Whitehouse <[email protected]>
1 parent 22e5aaa commit 1eef432

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,9 @@
77
- Fix: Revised SQLAlchemy dialect and examples for compatibility with SQLAlchemy==1.3.x (#173)
88
- Fix: oauth would fail if expired credentials appeared in ~/.netrc (#122)
99
- Fix: Python HTTP proxies were broken after switch to urllib3 (#158)
10+
- Other: Relax pandas dependency constraint to allow ^2.0.0 (#164)
1011
- Other: Connector now logs operation handle guids as hexadecimal instead of bytes (#170)
11-
- Add support for Cloud Fetch
12+
- Other: test_socket_timeout_user_defined e2e test was broken (#144)
1213

1314
## 2.7.0 (2023-06-26)
1415

tests/e2e/test_driver.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
import pytz
1717
import thrift
1818
import pytest
19+
from urllib3.connectionpool import ReadTimeoutError
1920

2021
import databricks.sql as sql
2122
from databricks.sql import STRING, BINARY, NUMBER, DATETIME, DATE, DatabaseError, Error, OperationalError, RequestError
@@ -509,12 +510,11 @@ def test_socket_timeout(self):
509510
def test_socket_timeout_user_defined(self):
510511
# We expect to see a TimeoutError when the socket timeout is only
511512
# 1 sec for a query that takes longer than that to process
512-
with self.assertRaises(RequestError) as cm:
513+
with self.assertRaises(ReadTimeoutError) as cm:
513514
with self.cursor({"_socket_timeout": 1}) as cursor:
514-
query = "select * from range(10000000)"
515+
query = "select * from range(1000000000)"
515516
cursor.execute(query)
516517

517-
self.assertIsInstance(cm.exception.args[1], TimeoutError)
518518

519519
def test_ssp_passthrough(self):
520520
for enable_ansi in (True, False):

0 commit comments

Comments
 (0)