Fix assertion for the revised SQLExceptionTranslator contract in 5.3

See gh-25681
This commit is contained in:
Juergen Hoeller 2020-09-03 19:34:54 +02:00
parent 3aae0fc91b
commit 33195da64f
1 changed files with 1 additions and 1 deletions

View File

@ -192,7 +192,7 @@ public class SQLErrorCodeSQLExceptionTranslatorTests {
given(dataSource.getConnection()).willThrow(connectionException);
SQLErrorCodeSQLExceptionTranslator sext = new SQLErrorCodeSQLExceptionTranslator(dataSource);
assertThat(sext.translate("test", null, duplicateKeyException)).isNotInstanceOf(DuplicateKeyException.class);
assertThat(sext.translate("test", null, duplicateKeyException)).isNull();
DatabaseMetaData databaseMetaData = mock(DatabaseMetaData.class);
given(databaseMetaData.getDatabaseProductName()).willReturn("Oracle");