We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fea273f commit 8bb1941Copy full SHA for 8bb1941
tests/mssql/configure-db.sh
@@ -1,7 +1,11 @@
1
#!/usr/bin/env bash
2
3
-# Wait 60 seconds for SQL Server to start up
4
-sleep 60
+# Wait for SQL Server to be ready for connections
+until /opt/mssql-tools18/bin/sqlcmd -S localhost -U sa -P $SA_PASSWORD -d master -Q "SELECT 1;" -No
5
+do
6
+ echo "Waiting for SQL Server to be ready..."
7
+ sleep 1
8
+done
9
10
# Run the setup script to create the DB and the schema in the DB
11
/opt/mssql-tools18/bin/sqlcmd -S localhost -U sa -P $SA_PASSWORD -d master -i setup.sql -No
0 commit comments