Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add load local path #167

Merged
merged 29 commits into from
May 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
a919f46
modify socketTimeout to 120s
aressu1985 May 2, 2023
efa0f2c
Merge branch 'matrixorigin:main' into main
aressu1985 May 18, 2023
1c62798
add regular match
aressu1985 May 20, 2023
94e47f5
Merge branch 'matrixorigin:main' into main
aressu1985 May 31, 2023
3798e26
support rc + Pessimistic
aressu1985 May 31, 2023
148dfd5
Merge branch 'main' into main
aressu1985 May 31, 2023
a6e0270
Merge branch 'matrixorigin:main' into main
aressu1985 Jul 6, 2023
e111699
Merge branch 'matrixorigin:main' into main
aressu1985 Jul 27, 2023
881add9
Merge branch 'matrixorigin:main' into main
aressu1985 Sep 15, 2023
f339944
revert Fix pessimistic commit wait error
aressu1985 Sep 15, 2023
7558672
revert revert
aressu1985 Sep 15, 2023
e489c5b
Merge branch 'matrixorigin:main' into main
aressu1985 Sep 15, 2023
0773c55
Merge branch 'matrixorigin:main' into main
aressu1985 Sep 15, 2023
50c995d
Merge branch 'matrixorigin:main' into main
aressu1985 Sep 15, 2023
37b8380
Merge branch 'matrixorigin:main' into main
aressu1985 Oct 10, 2023
f0de5ac
Merge branch 'matrixorigin:main' into main
aressu1985 Oct 11, 2023
41a2934
Merge branch 'matrixorigin:main' into main
aressu1985 Oct 18, 2023
2a95912
Merge branch 'matrixorigin:main' into main
aressu1985 Nov 21, 2023
21e93ab
Merge branch 'matrixorigin:main' into main
aressu1985 Jan 16, 2024
fc59c88
Merge branch 'matrixorigin:main' into main
aressu1985 Jan 17, 2024
bc5908f
Merge branch 'matrixorigin:main' into main
aressu1985 Jan 29, 2024
75d53d7
Merge branch 'matrixorigin:main' into main
aressu1985 Feb 26, 2024
7442b7b
add mo_debug to builtindb items
aressu1985 Feb 26, 2024
61d7d21
Merge branch 'matrixorigin:main' into main
aressu1985 Mar 22, 2024
8e0ddd5
Merge branch 'main' of https://github.com/aressu1985/mo-tester
aressu1985 Mar 22, 2024
62686cc
Merge branch 'matrixorigin:main' into main
aressu1985 May 28, 2024
9ea319c
Merge branch 'main' of https://github.com/aressu1985/mo-tester
aressu1985 May 28, 2024
430ebf7
add load local path
aressu1985 May 28, 2024
ed12fa0
Merge branch 'matrixorigin:main' into add_load_local_path
aressu1985 May 28, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified lib/mo-tester-1.0-SNAPSHOT.jar
Binary file not shown.
1 change: 1 addition & 0 deletions src/main/java/io/mo/Tester.java
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ public static void main(String[] args){
srcPath = srcPath.substring(0,srcPath.indexOf(COMMON.RESOURCE_DIR)+COMMON.RESOURCE_DIR.length());
}
COMMON.RESOURCE_PATH = srcPath;
COMMON.RESOURCE_LOCAL_PATH = srcPath;
}

//get method
Expand Down
2 changes: 2 additions & 0 deletions src/main/java/io/mo/constant/COMMON.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ public class COMMON {

public static String COLUMN_SEPARATOR_FLAG = "-- @separator:";
public static String RESOURCE_PATH_FLAG = "\\$resources";
public static String RESOURCE_LOCAL_PATH_FLAG= "\\$resources_local";

public static String WAIT_FLAG = "-- @wait:";

Expand All @@ -55,6 +56,7 @@ public class COMMON {
public static String RESOURCE_DIR = "resources";

public static String RESOURCE_PATH = "./resources";
public static String RESOURCE_LOCAL_PATH = "./resources";
public static String UPDATE_RESULT_TEMPLATE = "Query OK, {num} row affected";

public static int WAIT_TIMEOUT = 5000;
Expand Down
4 changes: 3 additions & 1 deletion src/main/java/io/mo/db/Executor.java
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,9 @@ public static void run(TestScript script){
//connection.setCatalog(command.getUseDB());
command.setUseDB(connection.getCatalog());
statement = connection.createStatement();
String sqlCmd = command.getCommand().replaceAll(COMMON.RESOURCE_PATH_FLAG,COMMON.RESOURCE_PATH);
String sqlCmd = command.getCommand()
.replaceAll(COMMON.RESOURCE_LOCAL_PATH_FLAG,COMMON.RESOURCE_LOCAL_PATH)
.replaceAll(COMMON.RESOURCE_PATH_FLAG,COMMON.RESOURCE_PATH);
if(command.isNeedWait()){
execWaitOperation(command);
}
Expand Down
1 change: 1 addition & 0 deletions src/main/java/io/mo/util/RunConfUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ public static String getResourcePath(){
srcPath = srcPath.replace(COMMON.CASES_DIR,COMMON.RESOURCE_DIR);
srcPath = srcPath.substring(0,srcPath.indexOf(COMMON.RESOURCE_DIR)+COMMON.RESOURCE_DIR.length());
}
COMMON.RESOURCE_LOCAL_PATH = srcPath;
return srcPath == null?COMMON.RESOURCE_PATH:srcPath;
}

Expand Down
Loading