Skip to content

Commit 8bb1941

Browse files
committed
faster mssql startup
1 parent fea273f commit 8bb1941

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

tests/mssql/configure-db.sh

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
#!/usr/bin/env bash
22

3-
# Wait 60 seconds for SQL Server to start up
4-
sleep 60
3+
# Wait for SQL Server to be ready for connections
4+
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
59

610
# Run the setup script to create the DB and the schema in the DB
711
/opt/mssql-tools18/bin/sqlcmd -S localhost -U sa -P $SA_PASSWORD -d master -i setup.sql -No

0 commit comments

Comments
 (0)