Commit dbf1744
committed
Fix JDBC driver CI test failures: encoding and Testcontainers
Note: The PR was created with the help of AI tools and a human.
Fix two root causes of CI test failures reproduced in ubuntu:24.04
container with Zulu Java 17 + Gradle 9.3.1 (matching GitHub Actions):
build.gradle.kts: Set javac encoding to UTF-8 to prevent Unicode test
failures (e.g. Greek Omega) when the CI runner locale defaults to
US-ASCII. Without this, source characters are garbled at compile time,
causing deterministic assertion failures in AgtypeFactoryTest and
AgtypeUtilTest.
BaseDockerizedTest.java: Fix Testcontainers setup reliability -
- Add Wait.forLogMessage wait strategy with 60s timeout so PostgreSQL
is fully ready before JDBC connection attempt
- Use getHost() instead of hardcoded "localhost" for correct behavior
in Docker-in-Docker and varied CI environments
- Add sslmode=disable to JDBC URL since PostgreSQL driver 42.6.0+
attempts SSL negotiation by default and the AGE Docker image has no
SSL configured
- Remove silent catch/println that swallowed connection errors and
produced misleading NullPointerExceptions downstream
Verified: 77/77 tests pass across multiple consecutive runs.
modified: drivers/jdbc/lib/build.gradle.kts
modified: drivers/jdbc/lib/src/test/java/org/apache/age/jdbc/BaseDockerizedTest.java1 parent 5fe2121 commit dbf1744
2 files changed
Lines changed: 14 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
48 | 52 | | |
49 | 53 | | |
50 | 54 | | |
| |||
Lines changed: 10 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| 24 | + | |
24 | 25 | | |
25 | 26 | | |
26 | 27 | | |
27 | 28 | | |
28 | 29 | | |
29 | 30 | | |
30 | 31 | | |
| 32 | + | |
31 | 33 | | |
32 | 34 | | |
33 | 35 | | |
| |||
54 | 56 | | |
55 | 57 | | |
56 | 58 | | |
57 | | - | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
58 | 62 | | |
59 | 63 | | |
| 64 | + | |
60 | 65 | | |
61 | 66 | | |
62 | | - | |
| 67 | + | |
63 | 68 | | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
71 | 72 | | |
72 | 73 | | |
73 | 74 | | |
| |||
0 commit comments