bug fixed for sql parser && enhance mock driver

This commit is contained in:
温少
2012-03-31 22:44:05 +08:00
parent ffcd1cae4a
commit 8a6bd52078
7 changed files with 126 additions and 31 deletions
@@ -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
}
}
}
}
}