Skip to content

Two unit tests are failing on a Windows Server 2025 and JDK 24 specific combination #2489

@linghengqian

Description

@linghengqian

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

  • Under a specific combination of Windows Server 2025 and JDK 24, all unit tests performed normally.

Actual behavior

org.apache.shardingsphere.elasticjob.spring.namespace.job.JobSpringNamespaceWithTypeTest
org.apache.shardingsphere.elasticjob.spring.namespace.job.OneOffJobSpringNamespaceWithTypeTest

Reason analyze (If you can)

  • Windows Server 2025 uses PowerShell 7 as its default shell, which behaves differently from Bash, the shell used by Ubuntu. However, further investigation is still needed, as I personally do not have a Windows Server 2025 testing environment on my local machine. As for why JDK 8 doesn't have this problem, I really don't know.
  • The related unit tests also involve the issue at Prevent unit tests and E2E from using host ports 3181, 9898 and 18181 #2410 .

Steps to reproduce the behavior.

  • For PowerShell 7 under Windows 11,
winget install --id version-fox.vfox --source winget
echo 'Invoke-Expression "$(vfox activate pwsh)"' >> $PROFILE
# Open a new PowerShell 7 terminal
vfox add java
vfox install java@24.0.2-graalce
vfox use --global java@24.0.2-graalce
git clone git@github.com:apache/shardingsphere-elasticjob.git
cd ./shardingsphere-elasticjob/
./mvnw --batch-mode --no-transfer-progress '-Dmaven.javadoc.skip=true' clean install -T1C

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

  • Not really needed.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions