You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by "linghengqian (via GitHub)" <gi...@apache.org> on 2024/03/03 14:55:10 UTC
[PR] Fixes #30361 causing ClasspathResourceDirectoryReaderTest to fail on Windows 11 [shardingsphere]
linghengqian opened a new pull request, #30379:
URL: https://github.com/apache/shardingsphere/pull/30379
Fixes https://github.com/apache/shardingsphere/actions/runs/8124502923/job/22206061492 .
Changes proposed in this pull request:
- Fixes #30361 causing ClasspathResourceDirectoryReaderTest to fail on Windows 11.
---
Before committing this PR, I'm sure that I have checked the following options:
- [x] My code follows the [code of conduct](https://shardingsphere.apache.org/community/en/involved/conduct/code/) of this project.
- [x] I have self-reviewed the commit code.
- [x] I have (or in comment I request) added corresponding labels for the pull request.
- [x] I have passed maven check locally : `./mvnw clean install -B -T1C -Dmaven.javadoc.skip -Dmaven.jacoco.skip -e`.
- [ ] I have made corresponding changes to the documentation.
- [x] I have added corresponding unit tests for my changes.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fixes #30361 causing ClasspathResourceDirectoryReaderTest to fail on Windows 11 [shardingsphere]
Posted by "linghengqian (via GitHub)" <gi...@apache.org>.
linghengqian closed pull request #30379: Fixes #30361 causing ClasspathResourceDirectoryReaderTest to fail on Windows 11
URL: https://github.com/apache/shardingsphere/pull/30379
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fixes #30361 causing ClasspathResourceDirectoryReaderTest to fail on Windows 11 [shardingsphere]
Posted by "linghengqian (via GitHub)" <gi...@apache.org>.
linghengqian commented on code in PR #30379:
URL: https://github.com/apache/shardingsphere/pull/30379#discussion_r1510295989
##########
infra/util/src/test/java/org/apache/shardingsphere/infra/util/directory/ClasspathResourceDirectoryReaderTest.java:
##########
@@ -45,13 +45,13 @@ void assertReadTest() {
assertThat(resourceNameList.size(), is(5));
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", "yaml/fixture/fixture.yaml"));
+ "yaml" + separator + "shortcuts-fixture.yaml", "yaml" + separator + "fixture" + separator + "fixture.yaml"));
}
@Test
void assertReadNestedTest() {
List<String> resourceNameList = ClasspathResourceDirectoryReader.read("yaml/fixture").collect(Collectors.toList());
assertThat(resourceNameList.size(), is(1));
- assertThat(resourceNameList, hasItems("yaml/fixture/fixture.yaml"));
+ assertThat(resourceNameList, hasItems("yaml/fixture" + File.separator + "fixture.yaml"));
Review Comment:
- @iamhucong Hi, I was wondering if getting a URL like `yaml/fixture\\fixture.yaml` on Windows 11 is the expected behavior expected by #30361 ?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fixes #30361 causing ClasspathResourceDirectoryReaderTest to fail on Windows 11 [shardingsphere]
Posted by "iamhucong (via GitHub)" <gi...@apache.org>.
iamhucong commented on code in PR #30379:
URL: https://github.com/apache/shardingsphere/pull/30379#discussion_r1510478862
##########
infra/util/src/test/java/org/apache/shardingsphere/infra/util/directory/ClasspathResourceDirectoryReaderTest.java:
##########
@@ -45,13 +45,13 @@ void assertReadTest() {
assertThat(resourceNameList.size(), is(5));
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", "yaml/fixture/fixture.yaml"));
+ "yaml" + separator + "shortcuts-fixture.yaml", "yaml" + separator + "fixture" + separator + "fixture.yaml"));
}
@Test
void assertReadNestedTest() {
List<String> resourceNameList = ClasspathResourceDirectoryReader.read("yaml/fixture").collect(Collectors.toList());
assertThat(resourceNameList.size(), is(1));
- assertThat(resourceNameList, hasItems("yaml/fixture/fixture.yaml"));
+ assertThat(resourceNameList, hasItems("yaml/fixture" + File.separator + "fixture.yaml"));
Review Comment:
@linghengqian It should be a path that can obtain resources through the ClassLoader#getResource method. Thank you for your fix.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org