r2dbc: Spring Data R2DBC CRUD, DatabaseClient, reactive transactions and Testcontainers Postgres (post 2)

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017ic4b4VQVEJWetTT1dYzyJ
This commit is contained in:
2026-10-29 04:16:34 +00:00
co-authored by Claude Sonnet 5.5
parent 89358e7b7c
commit 7d7d4e872e
27 changed files with 813 additions and 0 deletions
+20
View File
@@ -0,0 +1,20 @@
#!/usr/bin/env bash
# Shows the real failure when testcontainers-r2dbc is NOT on the test classpath.
# Builds a temporary pom without that dependency, runs one test, keeps the key lines.
set -uo pipefail
cd "$(dirname "$0")/.."
python3 - <<'PY'
import re
s = open('pom.xml').read()
s = re.sub(r'\s*<dependency>\s*<groupId>org.testcontainers</groupId>\s*<artifactId>testcontainers-r2dbc</artifactId>\s*<scope>test</scope>\s*</dependency>', '', s)
open('pom-no-tc-r2dbc.xml', 'w').write(s)
PY
mvn -B -q -T1 -f pom-no-tc-r2dbc.xml test -Dtest='R2dbcDemoTest#schemaCreatedByBootAtStartup' > /tmp/no-tc-r2dbc.log 2>&1
{
echo "mvn test with testcontainers-r2dbc removed from the pom:"
grep -m1 -o 'Tests run:.*' /tmp/no-tc-r2dbc.log
grep -m1 -o "Failed to instantiate \[io.r2dbc.pool.ConnectionPool\]: Factory method 'connectionFactory' threw exception with message: [^ ]*" /tmp/no-tc-r2dbc.log
grep -m1 'Caused by: java.lang.ClassNotFoundException' /tmp/no-tc-r2dbc.log
} > output/08-missing-testcontainers-r2dbc.txt
rm -f pom-no-tc-r2dbc.xml
cat output/08-missing-testcontainers-r2dbc.txt