fix: 批量执行接口用例报错
This commit is contained in:
parent
44f289f752
commit
0d297aada9
|
@ -22,7 +22,8 @@ public class ScriptEngineUtils {
|
|||
}
|
||||
}
|
||||
|
||||
public static String calculate(String input) {
|
||||
// graal.js 禁止多线程同时访问,加上 synchronized
|
||||
public synchronized static String calculate(String input) {
|
||||
try {
|
||||
return engine.eval("calculate('" + input + "')").toString();
|
||||
} catch (ScriptException e) {
|
||||
|
|
Loading…
Reference in New Issue