Fix jdbc template query timeout test.
This commit is contained in:
parent
2d68fca3a0
commit
17241d4843
@ -17,7 +17,7 @@ package org.thingsboard.server.dao.sql;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.dao.DataAccessResourceFailureException;
|
||||
import org.springframework.dao.QueryTimeoutException;
|
||||
import org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate;
|
||||
import org.springframework.test.context.TestPropertySource;
|
||||
import org.thingsboard.server.dao.AbstractJpaDaoTest;
|
||||
@ -34,6 +34,6 @@ public class JdbcTemplateTest extends AbstractJpaDaoTest {
|
||||
|
||||
@Test
|
||||
public void queryTimeoutTest() {
|
||||
assertThrows(DataAccessResourceFailureException.class, () -> jdbcTemplate.query("SELECT pg_sleep(10)", rs -> {}));
|
||||
assertThrows(QueryTimeoutException.class, () -> jdbcTemplate.query("SELECT pg_sleep(10)", rs -> {}));
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user