From 8b6adb4ac3384701a838f7dda1e1f31da76da37b Mon Sep 17 00:00:00 2001 From: Mihaly Lengyel Date: Tue, 29 Oct 2024 10:00:56 +0100 Subject: [PATCH] test: try and improve flaky tests --- .circleci/config.yml | 9 --------- .circleci/doTests.sh | 11 +++++++++++ 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index bcf49b4f2..280919e1f 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -24,15 +24,6 @@ jobs: - run: echo "listen_addresses='*'" >> /etc/postgresql/9.5/main/postgresql.conf - run: sed -i 's/^#*\s*max_connections\s*=.*/max_connections = 10000/' /etc/postgresql/9.5/main/postgresql.conf - run: (cd .circleci/ && ./doTests.sh << parameters.plugin >>) - - run: - command: cp ~/supertokens-root/supertokens-core/build/test-results/test/*.xml ~/junit/ - when: always - - when: - condition: - not: - equal: [ << parameters.plugin >>, "sqlite" ] - steps: - - run: cp ~/supertokens-root/supertokens-<< parameters.plugin >>-plugin/build/test-results/test/*.xml ~/junit/ - store_test_results: path: ~/junit - slack/status diff --git a/.circleci/doTests.sh b/.circleci/doTests.sh index 6404af168..7c086a626 100755 --- a/.circleci/doTests.sh +++ b/.circleci/doTests.sh @@ -65,6 +65,8 @@ then exit 1 fi +mkdir -p ~/junit + someTestsRan=false while read -u 10 line do @@ -198,6 +200,15 @@ do echo "" cd ../ + + if [ -d ~/junit ] + cp ~/supertokens-root/supertokens-core/build/test-results/test/*.xml ~/junit/ + + if [[ $pluginToTest -ne "sqlite" ]] + cp "~/supertokens-root/supertokens-$pluginToTest-plugin/build/test-results/test/*.xml" ~/junit/ + fi + fi + rm -rf supertokens-root if [[ $currPinnedDb == "sqlite" ]]