From 3f1127489d42d552f3d0319a3b58322c929a4ab9 Mon Sep 17 00:00:00 2001 From: Justin Baur <19896123+justindbaur@users.noreply.github.com> Date: Tue, 10 Sep 2024 13:22:37 -0400 Subject: [PATCH] Print DB Logs (#4754) * Print DB Logs * Fake Fail Test * Remove Test Stuff * Prefer Long-Hand Options * Remove Test Failure * Print deadlocks --- .github/workflows/test-database.yml | 12 ++++++++++++ dev/docker-compose.yml | 4 +++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test-database.yml b/.github/workflows/test-database.yml index 26d7a0508..ef02f8b70 100644 --- a/.github/workflows/test-database.yml +++ b/.github/workflows/test-database.yml @@ -114,6 +114,18 @@ jobs: BW_TEST_DATABASES__3__CONNECTIONSTRING: "Data Source=${{ runner.temp }}/test.db" run: dotnet test --logger "trx;LogFileName=infrastructure-test-results.trx" shell: pwsh + + - name: Print MySQL Logs + if: failure() + run: 'docker logs $(docker ps --quiet --filter "name=mysql")' + + - name: Print Postgres Logs + if: failure() + run: 'docker logs $(docker ps --quiet --filter "name=postgres")' + + - name: Print MSSQL Logs + if: failure() + run: 'docker logs $(docker ps --quiet --filter "name=mssql")' - name: Report test results uses: dorny/test-reporter@31a54ee7ebcacc03a09ea97a7e5465a47b84aea5 # v1.9.1 diff --git a/dev/docker-compose.yml b/dev/docker-compose.yml index 4d75f2007..95c00da28 100644 --- a/dev/docker-compose.yml +++ b/dev/docker-compose.yml @@ -58,7 +58,9 @@ services: container_name: bw-mysql ports: - "3306:3306" - command: --default-authentication-plugin=mysql_native_password + command: + - --default-authentication-plugin=mysql_native_password + - --innodb-print-all-deadlocks=ON environment: MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD} MYSQL_DATABASE: vault_dev