From aead83b47d00f5420843ec258d430c63797db747 Mon Sep 17 00:00:00 2001 From: Gil Forsyth Date: Mon, 29 Jul 2024 11:50:54 -0400 Subject: [PATCH] chore(mssql): sleep in the healthcheck to make sure collation is setup Yes this is incredibly gross, but even specifying the collation in the `CREATE DATABASE` call doesn't work reliably. --- compose.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/compose.yaml b/compose.yaml index ff56df81da695..50dd38dfeef79 100644 --- a/compose.yaml +++ b/compose.yaml @@ -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: