Skip to content
This repository was archived by the owner on Nov 30, 2023. It is now read-only.

Commit 6610daa

Browse files
authored
Fix regression test bugs
1 parent 009086c commit 6610daa

File tree

3 files changed

+17
-4
lines changed

3 files changed

+17
-4
lines changed

containers/cpp-mariadb/test-project/test.sh

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,18 @@ if [ "$(dpkg --print-architecture)" = "amd64" ] || [[ ! "${VCPKG_UNSUPPORTED_ARM
2424
fi
2525
checkOSPackages "tools-for-mariadb" libmariadb3 libmariadb-dev
2626
check "g++" g++ -g main.cpp -o main.out -lmariadbcpp
27-
check "main.out" ./main.out
27+
# MariaDB may take a few seconds to start, so retry on failure
28+
check_ok=false
29+
retry_count=0
30+
until [ "${check_ok}" = "true" ] || [ "${retry_count}" -eq "5" ]; do
31+
./main.out && check_ok=true
32+
if [ "${check_ok}" != "true" ]; then
33+
echo "(*) Check failed, DB may not be up yet. Retrying in 5s..."
34+
(( retry_count++ ))
35+
sleep 5s
36+
fi
37+
done
38+
check "main.out" sh -c "[ \"${check_ok}\" = \"true\" ]"
2839
rm main.out
2940
mkdir -p build
3041
cd build

containers/elixir-phoenix-postgres/.devcontainer/docker-compose.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ services:
1010
VARIANT: "1.12.3"
1111
# Phoenix Version: 1.4.17, 1.5.4, ...
1212
PHOENIX_VERSION: "1.6.2"
13-
# Node Version: 10, 11, ...
14-
NODE_VERSION: "none"
13+
# Node Version: 12, 14, ...
14+
NODE_VERSION: "16"
1515

1616
volumes:
1717
- ..:/workspace:cached

containers/elixir-phoenix-postgres/test-project/test.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,10 @@ checkCommon
1313
# Actual tests
1414
checkExtension "jakebecker.elixir-ls"
1515
check "elixir" iex --version
16+
. /usr/local/share/nvm/nvm.sh
17+
check "nvm" nvm install 16
1618
check "node" node --version
17-
check "npm" npm install
19+
check "npm" npm --version
1820
check "build test project" echo yes | mix phx.new example --live
1921
check "download deps" cd ./example && mix deps.get && mix deps.compile
2022
# Hex only installed for non-root user, so skip phoenix test for root

0 commit comments

Comments
 (0)