[Bug] Unit Test On windows-latest (JDK: 8) action failed
- Dominant language
- Java
- Stars
- 41.6k
- Forks
- 26.4k
- Avg merge
- 15h 13m
- Merged PRs (30d)
- 4
Description
### Pre-check
- [X] I am sure that all the content I provide is in English.
### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dubbo/issues?q=is%3Aissue) and found no similar issues.
### Apache Dubbo Component
Java SDK (apache/dubbo)
### Dubbo Version
dubbo 3.2
### Steps to reproduce this issue
in action
### What you expected to happen
test action run success;
### Anything else
error code :
```java
00:30:56.252 |-WARN [main] dubbo.common.cache.FileCacheStoreFactory: -| [DUBBO] Failed to create file store cache. Local file cache will be disabled. Cache file name: D:\a\dubbo\dubbo\dubbo-common\target\test-classes\testCacheContains.dubbo.cache, dubbo version: 3.3.0-beta.5-SNAPSHOT, current host: 172.31.112.1, error code: 0-3. This may be caused by inaccessible of cache path, go to https://dubbo.apache.org/faq/0/3 to find instructions.
org.apache.dubbo.common.cache.FileCacheStoreFactory$PathNotExclusiveException: D:\a\dubbo\dubbo\dubbo-common\target\test-classes\testCacheContains.dubbo.cache is not exclusive. Maybe multiple Dubbo instances are using the same folder.
at org.apache.dubbo.common.cache.FileCacheStoreFactory.tryFileLock(FileCacheStoreFactory.java:199) ~[classes/:?]
at org.apache.dubbo.common.cache.FileCacheStoreFactory.getFile(FileCacheStoreFactory.java:157) ~[classes/:?]
at org.apache.dubbo.common.cache.FileCacheStoreFactory.lambda$getInstance$0(FileCacheStoreFactory.java:120) ~[classes/:?]
at org.apache.dubbo.common.utils.ConcurrentHashMapUtils.computeIfAbsent(ConcurrentHashMapUtils.java:42) ~[classes/:?]
at org.apache.dubbo.common.cache.FileCacheStoreFactory.getInstance(FileCacheStoreFactory.java:120) ~[classes/:?]
at org.apache.dubbo.common.cache.FileCacheStoreFactory.getInstance(FileCacheStoreFactory.java:80) ~[classes/:?]
at org.apache.dubbo.common.cache.FileCacheStoreFactoryTest.testCacheContains(FileCacheStoreFactoryTest.java:62) ~[test-classes/:?]
... suppressed 31 lines
at java.util.ArrayList.forEach(ArrayList.java:1259) ~[?:1.8.0_412]
... suppressed 9 lines
at java.util.ArrayList.forEach(ArrayList.java:1259) ~[?:1.8.0_412]
... suppressed 21 lines
at org.apache.maven.surefire.junitplatform.LazyLauncher.execute(LazyLauncher.java:56) [surefire-junit-platform-3.3.0.jar:3.3.0]
at org.apache.maven.surefire.junitplatform.JUnitPlatformProvider.execute(JUnitPlatformProvider.java:184) [surefire-junit-platform-3.3.0.jar:3.3.0]
at org.apache.maven.surefire.junitplatform.JUnitPlatformProvider.invokeAllTests(JUnitPlatformProvider.java:148) [surefire-junit-platform-
```
### Are you willing to submit a pull request to fix on your own?
- [ ] Yes I am willing to submit a pull request on my own!
### Code of Conduct
- [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
Contributor guide
Research direction
Start with the Windows-latest workflow and the failure in FileCacheStoreFactoryTest.java at line 62. Read FileCacheStoreFactory.java around tryFileLock and getFile, then reproduce the test with JDK 8 on Windows. Done means the unit-test action completes successfully without the cache-lock failure.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- github-actions, java
- Domain
- ci-cd, testing
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100