Skip to content

Commit

Permalink
[sqlserver] run sqlserver test in non-utc timezone (#19135)
Browse files Browse the repository at this point in the history
* run sqlserver test in non-utc timezone

* add tokyo to tz testing
  • Loading branch information
lu-zhengda authored Nov 27, 2024
1 parent f5d2802 commit af5a034
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
12 changes: 12 additions & 0 deletions sqlserver/hatch.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@ os = ["linux"]
version = ["2017", "2019", "2022"]
setup = ["single", "ha"]

# test the compatibility of sqlserver running on non-utc timezone
[[envs.default.matrix]]
python = ["3.12"]
os = ["linux"]
version = ["2022"]
tz = ["newyork", "tokyo"]

# test the full combination of python-version/driver against a the latest sql server version
# ideally we'd test this against all sql server versions but that makes the test take too long and time out.
# time out. until we're able to modify and parallelize the work we'll limit the per-driver tests to only a single
Expand All @@ -32,6 +39,7 @@ setup = ["single"]
[envs.default.env-vars]
ODBCSYSINI = "{root}{/}tests{/}odbc"
COMPOSE_FOLDER = "compose"
TZ="UTC"
PIP_EXTRA_INDEX_URL = "https://datadoghq.dev/ci-wheels/bin"

[envs.default.overrides]
Expand Down Expand Up @@ -62,6 +70,10 @@ matrix.version.env-vars = [
matrix.driver.env-vars = [
{ key = "WINDOWS_SQLSERVER_DRIVER", platform = ["windows"] },
]
matrix.tz.env-vars = [
{ key = "TZ", value = "America/New_York", if = ["newyork"] },
{ key = "TZ", value = "Asia/Tokyo", if = ["tokyo"] },
]
name.linux-odbc-2019-high-cardinality.env-vars = "COMPOSE_FOLDER=compose-high-cardinality"
name.linux-odbc-2022-high-cardinality.env-vars = "COMPOSE_FOLDER=compose-high-cardinality"
name.windows-odbc-2019-high-cardinality.env-vars = "COMPOSE_FOLDER=compose-high-cardinality-windows"
1 change: 1 addition & 0 deletions sqlserver/tests/compose/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ services:
environment:
- ACCEPT_EULA=Y
- SA_PASSWORD=Password123
- TZ=${TZ}
ports:
- "1433:1433"
volumes:
Expand Down

0 comments on commit af5a034

Please sign in to comment.