mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
bug fixed for sql parser && enhance mock driver
This commit is contained in:
@@ -507,4 +507,18 @@ public class MockConnection implements Connection {
|
||||
throw new SQLFeatureNotSupportedException();
|
||||
}
|
||||
|
||||
public void handleSleep() {
|
||||
if (getConnectProperties() != null) {
|
||||
Object propertyValue = getConnectProperties().get("executeSleep");
|
||||
|
||||
if (propertyValue != null) {
|
||||
long millis = Long.parseLong(propertyValue.toString());
|
||||
try {
|
||||
Thread.sleep(millis);
|
||||
} catch (InterruptedException e) {
|
||||
// skip
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user