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

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


The following commit(s) were added to refs/heads/master by this push:
     new f5a3cf9b0a5 Fixes ClasspathResourceDirectoryReaderTest failure on 
Windows 11 (#30355)
f5a3cf9b0a5 is described below

commit f5a3cf9b0a5c5fa88cc27a7874afe6050ff9b6c1
Author: Ling Hengqian <[email protected]>
AuthorDate: Fri Mar 1 12:42:24 2024 +0800

    Fixes ClasspathResourceDirectoryReaderTest failure on Windows 11 (#30355)
---
 .../infra/util/directory/ClasspathResourceDirectoryReaderTest.java   | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git 
a/infra/util/src/test/java/org/apache/shardingsphere/infra/util/directory/ClasspathResourceDirectoryReaderTest.java
 
b/infra/util/src/test/java/org/apache/shardingsphere/infra/util/directory/ClasspathResourceDirectoryReaderTest.java
index b8f3aa259d8..0ec67b6c6b0 100644
--- 
a/infra/util/src/test/java/org/apache/shardingsphere/infra/util/directory/ClasspathResourceDirectoryReaderTest.java
+++ 
b/infra/util/src/test/java/org/apache/shardingsphere/infra/util/directory/ClasspathResourceDirectoryReaderTest.java
@@ -19,6 +19,7 @@ package org.apache.shardingsphere.infra.util.directory;
 
 import org.junit.jupiter.api.Test;
 
+import java.io.File;
 import java.util.List;
 import java.util.stream.Collectors;
 
@@ -41,6 +42,8 @@ class ClasspathResourceDirectoryReaderTest {
     void read() {
         List<String> resourceNameList = 
ClasspathResourceDirectoryReader.read("yaml").collect(Collectors.toList());
         assertThat(resourceNameList.size(), is(4));
-        assertThat(resourceNameList, hasItems("yaml/accepted-class.yaml", 
"yaml/customized-obj.yaml", "yaml/empty-config.yaml", 
"yaml/shortcuts-fixture.yaml"));
+        final String separator = File.separator;
+        assertThat(resourceNameList, hasItems("yaml" + separator + 
"accepted-class.yaml", "yaml" + separator + "customized-obj.yaml", "yaml" + 
separator + "empty-config.yaml",
+                "yaml" + separator + "shortcuts-fixture.yaml"));
     }
 }

Reply via email to