mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
test DruidDataSource testcase
This commit is contained in:
@@ -1398,11 +1398,10 @@ public abstract class DruidAbstractDataSource extends WrapperAdapter implements
|
||||
}
|
||||
|
||||
// 35 - 39
|
||||
map.put("ConnectionConnectCount", stat.getConnectionStat().getConnectCount());
|
||||
Throwable lastConnectionError = stat.getConnectionStat().getErrorLast();
|
||||
if (lastConnectionError != null) {
|
||||
map.put("ConnectionErrorLastMessage", lastConnectionError.getMessage());
|
||||
map.put("ConnectionErrorLastStackTrace", IOUtils.getStackTrace(lastConnectionError));
|
||||
map.put("ConnectionConnectCount", createErrorCount);
|
||||
if (createError != null) {
|
||||
map.put("ConnectionErrorLastMessage", createError.getMessage());
|
||||
map.put("ConnectionErrorLastStackTrace", IOUtils.getStackTrace(createError));
|
||||
} else {
|
||||
map.put("ConnectionErrorLastMessage", null);
|
||||
map.put("ConnectionErrorLastStackTrace", null);
|
||||
|
||||
@@ -43,6 +43,8 @@ public class DruidDataSourceTest8 extends TestCase {
|
||||
}
|
||||
Assert.assertNotNull(error);
|
||||
Assert.assertTrue(dataSource.getCreateErrorCount() > 0);
|
||||
|
||||
dataSource.getCompositeData();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user