mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
mock refactor
This commit is contained in:
@@ -41,15 +41,17 @@ public class MockPreparedStatement extends PreparedStatementBase implements Prep
|
||||
@Override
|
||||
public ResultSet executeQuery() throws SQLException {
|
||||
checkOpen();
|
||||
|
||||
MockConnection conn = getConnection();
|
||||
|
||||
if (getConnection() != null && getConnection().getDriver() != null) {
|
||||
if (conn != null && conn.getDriver() != null) {
|
||||
return getConnection().getDriver().createResultSet(this);
|
||||
}
|
||||
|
||||
if (getConnection() != null) {
|
||||
getConnection().handleSleep();
|
||||
if (conn != null) {
|
||||
conn.handleSleep();
|
||||
}
|
||||
|
||||
|
||||
return new MockResultSet(this);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user