apache / dubbo

The java implementation of Apache Dubbo. An RPC and microservice framework.
https://dubbo.apache.org/
Apache License 2.0
40.22k stars 26.35k forks source link

[Bug] Unit Test On windows-latest (JDK: 8) action failed #14360

Open sunheyi6 opened 1 week ago

sunheyi6 commented 1 week ago

Pre-check

Search before asking

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 :

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?

Code of Conduct

AlbumenJ commented 1 week ago

Can you provide your workflow url? The msg above is not the root cause/

sunheyi6 commented 1 week ago

Can you provide your workflow url? The msg above is not the root cause/

in this url. In general, the "Build and Test Scheduled 3.1" and "Build and Test Scheduled 3.3" workflows mostly result in errors, while the "Build and Test Scheduled 3.2" version occasionally succeeds.

wcy666103 commented 1 week ago

Can you provide your workflow url? The msg above is not the root cause/

in this url. In general, the "Build and Test Scheduled 3.1" and "Build and Test Scheduled 3.3" workflows mostly result in errors, while the "Build and Test Scheduled 3.2" version occasionally succeeds.

I feel like you're talking about a normal error, not a unit test faild.I see you gave a few links 3.2 to find the end because of plugin issues.

sunheyi6 commented 1 week ago

Can you provide your workflow url? The msg above is not the root cause/

in this url. In general, the "Build and Test Scheduled 3.1" and "Build and Test Scheduled 3.3" workflows mostly result in errors, while the "Build and Test Scheduled 3.2" version occasionally succeeds.

I feel like you're talking about a normal error, not a unit test faild.I see you gave a few links 3.2 to find the end because of plugin issues.

I don't think it's a normal error. Version 3.2 might be, but versions 3.1 and 3.3 both report stable errors, which means there is indeed a problem with the code and it needs to be modified, rather than thinking it's a normal error.

AlbumenJ commented 1 week ago

Can you provide your workflow url? The msg above is not the root cause/

in this url. In general, the "Build and Test Scheduled 3.1" and "Build and Test Scheduled 3.3" workflows mostly result in errors, while the "Build and Test Scheduled 3.2" version occasionally succeeds.

I feel like you're talking about a normal error, not a unit test faild.I see you gave a few links 3.2 to find the end because of plugin issues.

I don't think it's a normal error. Version 3.2 might be, but versions 3.1 and 3.3 both report stable errors, which means there is indeed a problem with the code and it needs to be modified, rather than thinking it's a normal error.

Yep, you're right. But most of the failure are due to the stability of test cases. This is really hard and will takes lots of time to enhance.