File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed
core/src/test/java/com/taobao/arthas/core/mcp/tool/function/basic1000 Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change 11package com .taobao .arthas .core .mcp .tool .function .basic1000 ;
22
33import com .fasterxml .jackson .core .type .TypeReference ;
4+ import com .taobao .arthas .common .JavaVersionUtils ;
45import com .taobao .arthas .mcp .server .tool .ToolContext ;
56import com .taobao .arthas .mcp .server .util .JsonParser ;
67import org .junit .*;
1617import java .util .LinkedHashMap ;
1718import java .util .Map ;
1819
20+ /**
21+ * ViewFileTool 单元测试
22+ * 仅在 JDK 8 下运行,因为测试中使用反射修改环境变量的方式在高版本 JDK 中不可用
23+ */
1924public class ViewFileToolTest {
2025
2126 @ Rule
@@ -27,6 +32,8 @@ public class ViewFileToolTest {
2732
2833 @ Before
2934 public void setUp () {
35+ // 仅在 JDK 8 下运行测试
36+ Assume .assumeTrue ("此测试仅在 JDK 8 下运行" , JavaVersionUtils .isJava8 ());
3037 clearEnv (ViewFileTool .ALLOWED_DIRS_ENV );
3138 }
3239
You can’t perform that action at this time.
0 commit comments