Skip to content

Commit 627d10a

Browse files
committed
test: disable or adjust flaky integration tests
1 parent e457b2e commit 627d10a

File tree

3 files changed

+18
-15
lines changed

3 files changed

+18
-15
lines changed

test/integration/datatype/_generate_test_datatype_tables.py

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -169,18 +169,19 @@ def list(cls) -> typing.List["RedshiftDatatypes"]:
169169
"ffffffffffffff",
170170
)
171171
],
172-
RedshiftDatatypes.intervaly2m.name: [
173-
("37 months", IntervalYearToMonth(37), "y2m_postgres_format"),
174-
("1-1", IntervalYearToMonth(13), "y2m_sql_standard_format"),
175-
("-178956970-8", IntervalYearToMonth(-(2**31)), "y2m_min_value"),
176-
("178956970-7", IntervalYearToMonth(2**31 - 1), "y2m_max_value"),
177-
],
178-
RedshiftDatatypes.intervald2s.name: [
179-
("10 days 48 hours", IntervalDayToSecond(12 * 86400 * 1000000), "d2s_postgres_format"),
180-
("10 23:59:59.999999", IntervalDayToSecond(11 * 86400 * 1000000 - 1), "d2s_sql_standard_format"),
181-
("-106751991 -04:00:54.775808", IntervalDayToSecond(-(2**63)), "d2s_min_value"),
182-
("106751991 04:00:54.775807", IntervalDayToSecond(2**63 - 1), "d2s_max_value"),
183-
]
172+
# TODO: re-enable when server supports
173+
# RedshiftDatatypes.intervaly2m.name: [
174+
# ("37 months", IntervalYearToMonth(37), "y2m_postgres_format"),
175+
# ("1-1", IntervalYearToMonth(13), "y2m_sql_standard_format"),
176+
# ("-178956970-8", IntervalYearToMonth(-(2**31)), "y2m_min_value"),
177+
# ("178956970-7", IntervalYearToMonth(2**31 - 1), "y2m_max_value"),
178+
# ],
179+
# RedshiftDatatypes.intervald2s.name: [
180+
# ("10 days 48 hours", IntervalDayToSecond(12 * 86400 * 1000000), "d2s_postgres_format"),
181+
# ("10 23:59:59.999999", IntervalDayToSecond(11 * 86400 * 1000000 - 1), "d2s_sql_standard_format"),
182+
# ("-106751991 -04:00:54.775808", IntervalDayToSecond(-(2**63)), "d2s_min_value"),
183+
# ("106751991 04:00:54.775807", IntervalDayToSecond(2**63 - 1), "d2s_max_value"),
184+
# ]
184185
# TODO: re-enable
185186
# RedshiftDatatypes.geography.name: (
186187
# (

test/integration/datatype/test_datatypes.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,7 @@ def test_redshift_varbyte_insert(db_kwargs, _input, client_protocol) -> None:
121121
assert results[0][1] == bytes(data, encoding="utf-8").hex()
122122

123123

124+
@pytest.mark.skip(reason="awaiting-server-support")
124125
@pytest.mark.parametrize("client_protocol", ClientProtocolVersion.list())
125126
@pytest.mark.parametrize("datatype", [RedshiftDatatypes.intervaly2m.name, RedshiftDatatypes.intervald2s.name])
126127
def test_redshift_interval_insert(db_kwargs, datatype, client_protocol) -> None:
@@ -144,6 +145,7 @@ def test_redshift_interval_insert(db_kwargs, datatype, client_protocol) -> None:
144145
cursor.execute("drop table t_interval")
145146

146147

148+
@pytest.mark.skip(reason="awaiting-server-support")
147149
@pytest.mark.parametrize("client_protocol", ClientProtocolVersion.list())
148150
@pytest.mark.parametrize("datatype", [RedshiftDatatypes.intervaly2m.name, RedshiftDatatypes.intervald2s.name])
149151
def test_redshift_interval_prep_stmt(db_kwargs, datatype, client_protocol) -> None:

test/integration/test_cursor.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ def test_insert_data_bulk_raises_too_many_params(mocked_csv, db_kwargs) -> None:
159159

160160
with redshift_connector.connect(**db_kwargs) as conn:
161161
with conn.cursor() as cursor:
162-
cursor.execute("create temporary table githubissue165 (col1 int)")
162+
cursor.execute("create table githubissue165 (col1 int)")
163163
with pytest.raises(
164164
DataError,
165165
match="Prepared statement exceeds bind parameter limit 32767.",
@@ -181,7 +181,7 @@ def test_insert_data_bulk_raises_no_exception_32766(mocked_csv_32766, db_kwargs)
181181

182182
with redshift_connector.connect(**db_kwargs) as conn:
183183
with conn.cursor() as cursor:
184-
cursor.execute("create temporary table githubissue165 (col1 int)")
184+
cursor.execute("create table githubissue165 (col1 int)")
185185
try:
186186
cursor.insert_data_bulk(
187187
filename="mocked_csv_32766",
@@ -202,7 +202,7 @@ def test_insert_data_bulk_raises_no_exception_32767(mocked_csv_32767, db_kwargs)
202202

203203
with redshift_connector.connect(**db_kwargs) as conn:
204204
with conn.cursor() as cursor:
205-
cursor.execute("create temporary table githubissue165 (col1 int)")
205+
cursor.execute("create table githubissue165 (col1 int)")
206206
try:
207207
cursor.insert_data_bulk(
208208
filename="mocked_csv_32767",

0 commit comments

Comments
 (0)