提交 0f86c620 authored 作者: Evgenij Ryazanov's avatar Evgenij Ryazanov

Do not print names of scripts if TestScript is invoked from TestCrashAPI

上级 0fd3d307
...@@ -41,6 +41,7 @@ public class TestScript extends TestBase { ...@@ -41,6 +41,7 @@ public class TestScript extends TestBase {
/** If set to true, the test will exit at the first failure. */ /** If set to true, the test will exit at the first failure. */
private boolean failFast; private boolean failFast;
private final ArrayList<String> statements = new ArrayList<>(); private final ArrayList<String> statements = new ArrayList<>();
private boolean getAllStatementsMode;
private boolean reconnectOften; private boolean reconnectOften;
private Connection conn; private Connection conn;
...@@ -72,7 +73,12 @@ public class TestScript extends TestBase { ...@@ -72,7 +73,12 @@ public class TestScript extends TestBase {
public ArrayList<String> getAllStatements(TestAll conf) throws Exception { public ArrayList<String> getAllStatements(TestAll conf) throws Exception {
config = conf; config = conf;
if (statements.isEmpty()) { if (statements.isEmpty()) {
test(); try {
getAllStatementsMode = true;
test();
} finally {
getAllStatementsMode = false;
}
} }
return statements; return statements;
} }
...@@ -181,7 +187,9 @@ public class TestScript extends TestBase { ...@@ -181,7 +187,9 @@ public class TestScript extends TestBase {
putBack = null; putBack = null;
errors = null; errors = null;
println("Running commands in " + scriptFileName); if (!getAllStatementsMode) {
println("Running commands in " + scriptFileName);
}
final String outFile = "test.out.txt"; final String outFile = "test.out.txt";
conn = getConnection("script"); conn = getConnection("script");
stat = conn.createStatement(); stat = conn.createStatement();
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论