Skip to content

Commit

Permalink
Fix assertion for the revised SQLExceptionTranslator contract in 5.3
Browse files Browse the repository at this point in the history
  • Loading branch information
jhoeller committed Sep 3, 2020
1 parent 3aae0fc commit 33195da
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -192,7 +192,7 @@ public void dataSourceInitialization() throws Exception {
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");
Expand Down

0 comments on commit 33195da

Please sign in to comment.