mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
refactor
This commit is contained in:
@@ -19,4 +19,13 @@ public class MysqlTest extends TestCase {
|
||||
|
||||
return out.toString();
|
||||
}
|
||||
|
||||
protected void print(List<SQLStatement> stmtList) {
|
||||
String text = output(stmtList);
|
||||
String outputProperty = System.getProperty("druid.output");
|
||||
if ("false".equals(outputProperty)) {
|
||||
return;
|
||||
}
|
||||
System.out.println(text);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,4 +18,13 @@ public class OracleTest extends TestCase {
|
||||
|
||||
return out.toString();
|
||||
}
|
||||
|
||||
protected void print(List<SQLStatement> stmtList) {
|
||||
String text = output(stmtList);
|
||||
String outputProperty = System.getProperty("druid.output");
|
||||
if ("false".equals(outputProperty)) {
|
||||
return;
|
||||
}
|
||||
System.out.println(text);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,4 +18,13 @@ public class PGTest extends TestCase {
|
||||
|
||||
return out.toString();
|
||||
}
|
||||
|
||||
protected void print(List<SQLStatement> stmtList) {
|
||||
String text = output(stmtList);
|
||||
String outputProperty = System.getProperty("druid.output");
|
||||
if ("false".equals(outputProperty)) {
|
||||
return;
|
||||
}
|
||||
System.out.println(text);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -127,7 +127,7 @@ public class TestTransform extends OracleTest {
|
||||
r.setLastSnapshotDate(rs.getDate(7));
|
||||
r.setDbPk(rs.getLong(8));
|
||||
|
||||
System.out.println(i + "(" + r.getDbName() + "/" + r.getSqlId() + ") : " + r.getSqlText());
|
||||
System.out.println(i + "(" + r.getDbName() + "/" + r.getSqlId() + "/" + r.getCommandType() + ") : " + r.getSqlText());
|
||||
try {
|
||||
schemaStatInternal(r);
|
||||
} catch (Throwable e) {
|
||||
@@ -161,7 +161,7 @@ public class TestTransform extends OracleTest {
|
||||
SQLStatement statemen = statementList.get(0);
|
||||
|
||||
Assert.assertEquals(1, statementList.size());
|
||||
// System.out.println(output(statementList));
|
||||
// print(statementList);
|
||||
|
||||
OracleSchemaStatVisitor visitor = new OracleSchemaStatVisitor();
|
||||
statemen.accept(visitor);
|
||||
@@ -283,7 +283,7 @@ public class TestTransform extends OracleTest {
|
||||
SQLStatement statemen = statementList.get(0);
|
||||
|
||||
Assert.assertEquals(1, statementList.size());
|
||||
// System.out.println(output(statementList));
|
||||
// print(statementList);
|
||||
|
||||
OracleSchemaStatVisitor visitor = new OracleSchemaStatVisitor();
|
||||
statemen.accept(visitor);
|
||||
|
||||
@@ -19,4 +19,13 @@ public class HiveTest extends TestCase {
|
||||
|
||||
return out.toString();
|
||||
}
|
||||
|
||||
protected void print(List<SQLStatement> stmtList) {
|
||||
String text = output(stmtList);
|
||||
String outputProperty = System.getProperty("druid.output");
|
||||
if ("false".equals(outputProperty)) {
|
||||
return;
|
||||
}
|
||||
System.out.println(text);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user