DataSourceUtils lets timeout exceptions through even for setReadOnly calls (revised; SPR-7226)
This commit is contained in:
parent
8800bab8a6
commit
0c6b38b0b5
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2002-2009 the original author or authors.
|
* Copyright 2002-2010 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
|
@ -21,7 +21,6 @@ import java.sql.DatabaseMetaData;
|
||||||
import java.sql.PreparedStatement;
|
import java.sql.PreparedStatement;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
import java.sql.Savepoint;
|
import java.sql.Savepoint;
|
||||||
|
|
||||||
import javax.sql.DataSource;
|
import javax.sql.DataSource;
|
||||||
|
|
||||||
import junit.framework.TestCase;
|
import junit.framework.TestCase;
|
||||||
|
|
@ -463,6 +462,8 @@ public class DataSourceTransactionManagerTests extends TestCase {
|
||||||
conControl.setReturnValue(false, 1);
|
conControl.setReturnValue(false, 1);
|
||||||
con.rollback();
|
con.rollback();
|
||||||
conControl.setVoidCallable(1);
|
conControl.setVoidCallable(1);
|
||||||
|
con.setReadOnly(true);
|
||||||
|
conControl.setThrowable(new SQLException("read-only not supported"), 1);
|
||||||
con.isReadOnly();
|
con.isReadOnly();
|
||||||
conControl.setReturnValue(false, 1);
|
conControl.setReturnValue(false, 1);
|
||||||
con.close();
|
con.close();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue