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

This commit is contained in:
Juergen Hoeller 2010-05-25 14:10:28 +00:00
parent 8800bab8a6
commit 0c6b38b0b5
1 changed files with 3 additions and 2 deletions

View File

@ -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;
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 {
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();