use of io.r2dbc.spi.R2dbcTransientResourceException in project spring-framework by spring-projects.
the class ConnectionFactoryUtilsUnitTests method messageGenerationNullMessage.
@Test
public void messageGenerationNullMessage() {
Exception exception = ConnectionFactoryUtils.convertR2dbcException("TASK", "SOME-SQL", new R2dbcTransientResourceException());
assertThat(exception).isInstanceOf(TransientDataAccessResourceException.class).hasMessage("TASK; SQL [SOME-SQL]; null; nested exception is io.r2dbc.spi.R2dbcTransientResourceException");
}
use of io.r2dbc.spi.R2dbcTransientResourceException in project spring-framework by spring-projects.
the class ConnectionFactoryUtilsUnitTests method shouldTranslateTransientResourceException.
@Test
public void shouldTranslateTransientResourceException() {
Exception exception = ConnectionFactoryUtils.convertR2dbcException("", "", new R2dbcTransientResourceException(""));
assertThat(exception).isInstanceOf(TransientDataAccessResourceException.class);
}
use of io.r2dbc.spi.R2dbcTransientResourceException in project spring-framework by spring-projects.
the class ConnectionFactoryUtilsUnitTests method messageGenerationNullSQL.
@Test
public void messageGenerationNullSQL() {
Exception exception = ConnectionFactoryUtils.convertR2dbcException("TASK", null, new R2dbcTransientResourceException("MESSAGE"));
assertThat(exception).isInstanceOf(TransientDataAccessResourceException.class).hasMessage("TASK; MESSAGE; nested exception is io.r2dbc.spi.R2dbcTransientResourceException: MESSAGE");
}
use of io.r2dbc.spi.R2dbcTransientResourceException in project spring-framework by spring-projects.
the class ConnectionFactoryUtilsUnitTests method messageGeneration.
@Test
public void messageGeneration() {
Exception exception = ConnectionFactoryUtils.convertR2dbcException("TASK", "SOME-SQL", new R2dbcTransientResourceException("MESSAGE"));
assertThat(exception).isInstanceOf(TransientDataAccessResourceException.class).hasMessage("TASK; SQL [SOME-SQL]; MESSAGE; nested exception is io.r2dbc.spi.R2dbcTransientResourceException: MESSAGE");
}
Aggregations