apache / shardingsphere-elasticjob

Distributed scheduled job
Apache License 2.0
8.09k stars 3.28k forks source link

Unit test `DefaultJobClassNameProviderTest#assertGetLambdaJobName` fails on OpenJDK 21 #2370

Open linghengqian opened 7 months ago

linghengqian commented 7 months ago

Bug Report

For English only, other languages will not accept.

Before report a bug, make sure you have:

Please pay attention on issues you submitted, because we maybe need more details. If no response anymore and we cannot reproduce it on current information, we will close it.

Please answer these questions before submitting your issue. Thanks!

Which version of ElasticJob did you use?

Expected behavior

Actual behavior

Reason analyze (If you can)

Steps to reproduce the behavior.

Example codes for reproduce this issue (such as a github link).

@Test
@DisabledForJreRange(min = JRE.JAVA_21, max = JRE.OTHER)
void assertGetLambdaJobName() {
    JobClassNameProvider jobClassNameProvider = new DefaultJobClassNameProvider();
    FooJob lambdaFooJob = shardingContext -> {
    };
    String result = jobClassNameProvider.getJobClassName(lambdaFooJob);
    assertThat(result, is("org.apache.shardingsphere.elasticjob.kernel.internal.setup.DefaultJobClassNameProviderTest$$Lambda$"));
}
linghengqian commented 7 months ago