This is an automated email from the ASF dual-hosted git repository.

liuhongyu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shenyu.git


The following commit(s) were added to refs/heads/master by this push:
     new 33c79d19a2 Ci update cache (#6325)
33c79d19a2 is described below

commit 33c79d19a2613fe1b64998c593f117d3cede3cbb
Author: L <[email protected]>
AuthorDate: Wed Apr 15 09:16:13 2026 +0800

    Ci update cache (#6325)
    
    * ci: optimize CI workflows with cache and concurrency
    
    * add github action cache speed ​​up ci exec
    
    ---------
    
    Co-authored-by: moremind <[email protected]>
    Co-authored-by: aias00 <[email protected]>
---
 .../shenyu/plugin/mock/generator/ExpressionGeneratorTest.java       | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git 
a/shenyu-plugin/shenyu-plugin-mock/src/test/java/org/apache/shenyu/plugin/mock/generator/ExpressionGeneratorTest.java
 
b/shenyu-plugin/shenyu-plugin-mock/src/test/java/org/apache/shenyu/plugin/mock/generator/ExpressionGeneratorTest.java
index 3892d3d4fe..af4cbfcd20 100644
--- 
a/shenyu-plugin/shenyu-plugin-mock/src/test/java/org/apache/shenyu/plugin/mock/generator/ExpressionGeneratorTest.java
+++ 
b/shenyu-plugin/shenyu-plugin-mock/src/test/java/org/apache/shenyu/plugin/mock/generator/ExpressionGeneratorTest.java
@@ -201,9 +201,11 @@ public class ExpressionGeneratorTest {
     
     @Test
     public void testSafe() {
-        final String command = 
"T(java.lang.Runtime).getRuntime().exec(\"ls\")";
+        final boolean isWindows = 
System.getProperty("os.name").toLowerCase().contains("win");
+        final String nativeCmd = isWindows ? "cmd /c dir" : "ls";
+        final String command = "T(java.lang.Runtime).getRuntime().exec(\"" + 
nativeCmd + "\")";
 
-        assertDoesNotThrow(() -> 
assertNotNull(Runtime.getRuntime().exec("ls")));
+        assertDoesNotThrow(() -> 
assertNotNull(Runtime.getRuntime().exec(nativeCmd)));
 
         final StandardExpressionGenerator standardExpressionGenerator = new 
StandardExpressionGenerator();
         final String generate = 
standardExpressionGenerator.generate("standardSPELExpression|" + command, 
mockRequest);

Reply via email to