Browse Source

DataSourceUtils lets timeout exceptions through even for setReadOnly calls (revised; SPR-7226)

pull/1234/head
Juergen Hoeller 15 years ago
parent
commit
0c6b38b0b5
  1. 5
      org.springframework.jdbc/src/test/java/org/springframework/jdbc/datasource/DataSourceTransactionManagerTests.java

5
org.springframework.jdbc/src/test/java/org/springframework/jdbc/datasource/DataSourceTransactionManagerTests.java

@ -1,5 +1,5 @@ @@ -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");
* you may not use this file except in compliance with the License.
@ -21,7 +21,6 @@ import java.sql.DatabaseMetaData; @@ -21,7 +21,6 @@ import java.sql.DatabaseMetaData;
import java.sql.PreparedStatement;
import java.sql.SQLException;
import java.sql.Savepoint;
import javax.sql.DataSource;
import junit.framework.TestCase;
@ -463,6 +462,8 @@ public class DataSourceTransactionManagerTests extends TestCase { @@ -463,6 +462,8 @@ public class DataSourceTransactionManagerTests extends TestCase {
conControl.setReturnValue(false, 1);
con.rollback();
conControl.setVoidCallable(1);
con.setReadOnly(true);
conControl.setThrowable(new SQLException("read-only not supported"), 1);
con.isReadOnly();
conControl.setReturnValue(false, 1);
con.close();

Loading…
Cancel
Save