Polish "Add SAP HANA duplicate key exception error code"

See gh-31554
This commit is contained in:
Stéphane Nicoll
2023-11-07 10:31:14 +01:00
parent fcd4ba2f1f
commit 50e55d5219
3 changed files with 20 additions and 2 deletions

View File

@@ -100,6 +100,10 @@ public class ConnectionFactoryUtilsUnitTests {
new R2dbcDataIntegrityViolationException("reason", "23000", 1));
assertThat(exception).isExactlyInstanceOf(DuplicateKeyException.class);
exception = ConnectionFactoryUtils.convertR2dbcException("", "",
new R2dbcDataIntegrityViolationException("reason", "23000", 301));
assertThat(exception).isExactlyInstanceOf(DuplicateKeyException.class);
exception = ConnectionFactoryUtils.convertR2dbcException("", "",
new R2dbcDataIntegrityViolationException("reason", "23000", 1062));
assertThat(exception).isExactlyInstanceOf(DuplicateKeyException.class);