-
Bug
-
Resolution: Done
-
Minor
-
1.9.5.Final, 2.0.0.Beta1
-
None
-
False
-
None
-
False
Test method SignalBasedSnapshotChangeEventSourceTest.testBuildQueryThreePkColumns() fails because this line fails:
Assertions.assertThat(source.buildChunkQuery(table, Optional.empty())).isEqualTo("""
SELECT * FROM \"s1\".\"table1\"
WHERE ((\"pk1\" > ?)
OR (\"pk1\" = ? AND \"pk2\" > ?)
OR (\"pk1\" = ? AND \"pk2\" = ? AND \"pk3\" > ?))
AND NOT ((\"pk1\" > ?) OR (\"pk1\" = ? AND \"pk2\" > ?)
OR (\"pk1\" = ? AND \"pk2\" = ? AND \"pk3\" > ?))
ORDER BY \"pk1\", \"pk2\", \"pk3\"
LIMIT 1024
""".replace(System.getProperty("line.separator"), "").replace(" ", " ").trim());
The Java 15 Text Blocks feature is normalizing all line ending terminators to "\n" and not to the platform specific line terminator as coded above.
So on Windows, this code
.replace(System.getProperty("line.separator"), "")
does nothing.
The fix is simple:
.replace("\n", "")