From 73def01df15ee2883a2026540215ea469b744b0d Mon Sep 17 00:00:00 2001 From: aressu1985 <47846308+aressu1985@users.noreply.github.com> Date: Thu, 15 Sep 2022 12:19:10 +0800 Subject: [PATCH] Fix some bugs (#108) * fix some bugs * optimize the code * optimize code to resolve possible error for para parsing * modify some config and resolve a bug for genrs * modify a code error * update mo-tester-1.0-SNAPSHOT.jar * delete some log print and modfiy template cases --- assembly.xml | 7 ------- cases/template.result | 3 +-- cases/template.sql | 2 ++ lib/mo-tester-1.0-SNAPSHOT.jar | Bin 56288 -> 56341 bytes pom.xml | 2 +- src/main/java/io/mo/Tester.java | 12 ++++++++---- src/main/java/io/mo/db/Executor.java | 23 +++++++++++++++++++++-- 7 files changed, 33 insertions(+), 16 deletions(-) diff --git a/assembly.xml b/assembly.xml index 80f4cabd89..32b179f117 100755 --- a/assembly.xml +++ b/assembly.xml @@ -23,13 +23,6 @@ mo.yml run.yml log4j.properties - - 755 - ./ - - - ./ - run.sh 755 diff --git a/cases/template.result b/cases/template.result index 95bdea33f1..96301f14db 100644 --- a/cases/template.result +++ b/cases/template.result @@ -9,8 +9,7 @@ select min(int32),max(int32),max(int32)-1 from t1; min(int32) max(int32) max(int32) - 1 -1 2147483647 2147483646 select min(int32),max(int32),max(int32)-1 from t1 group by a; -min(int32) max(int32) max(int32) - 1 --1 2147483647 2147483646 +[unknown result because it is related to issue#1234] drop table t1; CREATE TABLE NATION ( N_NATIONKEY INTEGER NOT NULL, diff --git a/cases/template.sql b/cases/template.sql index 9f59a6d79b..fc014d7a6a 100644 --- a/cases/template.sql +++ b/cases/template.sql @@ -2,7 +2,9 @@ create table t1 ( a int not null default 1, int32 int primary key); insert into t1 (int32) values (-1),(1234567890),(2147483647); select * from t1 order by a desc, int32 asc; select min(int32),max(int32),max(int32)-1 from t1; +-- @bvt:issue#1234 select min(int32),max(int32),max(int32)-1 from t1 group by a; +-- @bvt:issue drop table t1; CREATE TABLE NATION ( N_NATIONKEY INTEGER NOT NULL, diff --git a/l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;YfA|YPMJ~n@+l|A^fZ@)>6WaQjmk8ZJ#x&3N#Pg9}m0?b+g0CE8Z)?lu zNq&<;h7V;+s->f+;D)c}`nevL4#OtO)Aw{^{GIHTOT_+}?Y zSF9~z+h2Gg8|kpg1;EG0$JqeI-KFKF_NRSaF3;UuS@xswI4{bJ#x;BHI*P;>N-pVA zF9!GJZg>_{jr;`+e_oS&xn0^~*p$rj$(gkumXuN45k}u&;>o`9nC+{yn$e)e zBIO2**)VtJSp%_wLmN%okA@^&Gr1WTSX%hp3Nv=1d_~`_#0v2{4@>omEpM`fJ053)Vjg$tNU~IY zdAv((0{CwQ^Pik17|(l6444KvK3IrnvXX5!>0v;!igV?II;XsuNb_t`ta09)8i7V_ zHbZw~2o}Jl?uy_kU$lRc0=m#@#$_W)xS`#!3Y$f$M7F^5t8?3ZLjP|#$ zP((8lGWb8&WP&%!o(8nhaD>57skPC05t@%u*;Uqp4J$7*=)$aJHY`l~g5Xke@mAbs zUu=M=F0EZGHslGU>C(BEx^%OF(GCqxIQQ{#ffjYW!a;C{?3(uw&2@Mpj+F zkiR$a#;*$yfZQ|^8V)olF-4bPzNS;i0kYL?}LC!6E`;0@+DKlqe6 zt`B~8j`stR=h;8x;`34;824Ye{$EJBApRkDSO9!r{lcQy z$GZ4SQXgpX7ypT?Zb|ZAza@ze6kGn6k6D)dU;Wv8%WPl%o=821RZ>Iy6Brl*EEpL6 z-|PI}qws4{1ZXOP5amCY0~YL`EsR(2A-G~eMzO@8tQEwM-7Ei!pyNSI@q~2$%Ua#x z6S-s>6c`v8-2Yyl7lgX{Z!^2#Dn2+ONN4p6@!$3T&y(N(1Y`tCTc!L6x*=| jar - morunner + mo-tester http://maven.apache.org diff --git a/src/main/java/io/mo/Tester.java b/src/main/java/io/mo/Tester.java index f5b895d46d..491b8f33a2 100755 --- a/src/main/java/io/mo/Tester.java +++ b/src/main/java/io/mo/Tester.java @@ -165,8 +165,9 @@ public static void main(String[] args){ public static void run(File file){ if(file.isFile()){ - if(file.getName().endsWith(".result")) + if(!(file.getName().endsWith(".sql") || file.getName().endsWith(".test"))) { return; + } if(isInclude(file.getName())) { ScriptParser.parseScript(file.getPath()); @@ -186,8 +187,9 @@ public static void run(File file){ public static void generateRs(File file){ if(file.isFile()){ - if(file.getName().endsWith(".result")) + if(!(file.getName().endsWith(".sql") || file.getName().endsWith(".test"))) { return; + } if(isInclude(file.getName())) { ScriptParser.parseScript(file.getPath()); @@ -209,8 +211,9 @@ public static void generateRs(File file){ public static void debug(File file){ if(file.isFile()){ - if(file.getName().endsWith(".result")) + if(!(file.getName().endsWith(".sql") || file.getName().endsWith(".test"))) { return; + } if(isInclude(file.getName())) { ScriptParser.parseScript(file.getPath()); @@ -228,8 +231,9 @@ public static void debug(File file){ public static void check(File file){ if(file.isFile()){ - if(file.getName().endsWith(".result")) + if(!(file.getName().endsWith(".sql") || file.getName().endsWith(".test"))) { return; + } if(isInclude(file.getName())) { ScriptParser.parseScript(file.getPath()); TestScript script = ScriptParser.getTestScript(); diff --git a/src/main/java/io/mo/db/Executor.java b/src/main/java/io/mo/db/Executor.java index daf9413504..7260dc9285 100755 --- a/src/main/java/io/mo/db/Executor.java +++ b/src/main/java/io/mo/db/Executor.java @@ -224,8 +224,26 @@ public static boolean genRS(TestScript script){ ArrayList commands = script.getCommands(); for (int j = 0; j < commands.size(); j++) { SqlCommand command = null; + try{ command = commands.get(j); + + if(command.isIgnore()) { + rs_writer.write(command.getCommand().trim()); + rs_writer.newLine(); + if (isUpdate) { + if (command.getExpResult() != null) { + if (command.getExpResult().getType() != RESULT.STMT_RESULT_TYPE_NONE) + rs_writer.write(command.getExpResult().getOrginalRSText()); + } + } else { + rs_writer.write("[unknown result because it is related to issue#" + command.getIssueNo() + "]"); + } + if(j < commands.size() -1) + rs_writer.newLine(); + continue; + } + connection = getConnection(command); statement = connection.createStatement(); @@ -238,7 +256,8 @@ public static boolean genRS(TestScript script){ actResult.setCommand(command); rs_writer.write(command.getCommand().trim()); rs_writer.newLine(); - if(command.isIgnore()) { + rs_writer.write(actResult.toString()); + /*if(command.isIgnore()) { if (isUpdate) { if (command.getExpResult() != null) { if (command.getExpResult().getType() != RESULT.STMT_RESULT_TYPE_NONE) @@ -254,7 +273,7 @@ public static boolean genRS(TestScript script){ } else { rs_writer.write(actResult.toString()); - } + }*/ if(j < commands.size() -1) rs_writer.newLine();