add testcase & bug fixed

This commit is contained in:
wenshao
2012-08-25 12:18:45 +08:00
parent 2ca722227f
commit 0daea54514
2 changed files with 12 additions and 1 deletions
@@ -955,6 +955,11 @@ public class DruidDataSource extends DruidAbstractDataSource implements DruidDat
notEmptyWaitThreadCount--;
}
notEmptyWaitCount++;
if (!enable) {
connectErrorCount.incrementAndGet();
throw new DataSourceDisableException();
}
}
} catch (InterruptedException ie) {
notEmpty.signal(); // propagate to non-interrupted thread
@@ -993,6 +998,11 @@ public class DruidDataSource extends DruidAbstractDataSource implements DruidDat
// creator
notEmptyWaitCount++;
notEmptyWaitNanos += (startEstimate - estimate);
if (!enable) {
connectErrorCount.incrementAndGet();
throw new DataSourceDisableException();
}
} catch (InterruptedException ie) {
notEmpty.signal(); // propagate to non-interrupted thread
notEmptySignalCount++;