Skip to content

Commit

Permalink
chore(mssql): sleep in the healthcheck to make sure collation is setup
Browse files Browse the repository at this point in the history
Yes this is incredibly gross, but even specifying the collation in the
`CREATE DATABASE` call doesn't work reliably.
  • Loading branch information
gforsyth committed Jul 29, 2024
1 parent 6ad5c15 commit a4ca276
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,13 @@ services:
# where the CI stands for Case Insensitive.
# We use a case-sensitive collation for testing so that we don't
# break users with case-sensitive collations.
MSSQL_COLLATION: "Latin1_General_100_BIN2_UTF8"
MSSQL_COLLATION: Latin1_General_100_BIN2_UTF8
healthcheck:
interval: 1s
retries: 20
test:
- CMD-SHELL
- $(find / -name sqlcmd -type f -executable) -C -S localhost -U sa -P "$$MSSQL_SA_PASSWORD" -Q "IF DB_ID('ibis_testing') IS NULL BEGIN CREATE DATABASE [ibis_testing] END"
- sleep 10 && $(find / -name sqlcmd -type f -executable) -C -S localhost -U sa -P "$$MSSQL_SA_PASSWORD" -Q "IF DB_ID('ibis_testing') is NULL BEGIN CREATE DATABASE [ibis_testing] END"
ports:
- 1433:1433
volumes:
Expand Down

0 comments on commit a4ca276

Please sign in to comment.