ballerina-lang icon indicating copy to clipboard operation
ballerina-lang copied to clipboard

[Bug]: `:jballerina-unit-test:test` gradle task produces false negative test failures for master branch on Windows

Open Thushara-Piyasekara opened this issue 10 months ago • 0 comments

Description

When :jballerina-unit-test:test task is executed using gradlew :jballerina-unit-test:test command on Windows CLI, it produces false negative test failures.

image

Following error is repeated in almost all the failing test stack traces,

java.lang.RuntimeException: Error: Could not find or load main class Piyasekara\.m2\repository\org\slf4j\slf4j-api\2.0.7\slf4j-api-2.0.7.jar;C:\Gradle\gradle-8.2.1\caches\modules-2\files-2.1\org.apache.maven.resolver\maven-resolver-tr
ansport-http\1.7.0\c125eb11115cb29eeabcaae4d41ce0e5dd5cd397\maven-resolver-transport-http-1.7.0.jar;C:\Users\Thushara

The reason seems to be due to the path for local maven repository containing a white space.

C:\Users\Thushara Piyasekara\.m2\

Similar issues were present when the cloned ballerina-lang repository was located inside a path with a whitespace.

Steps to Reproduce

  1. Clone the ballerina-lang repository to a Windows machine.
  2. Run ./gradlew :jballerina-unit-test:test command.

Affected Version(s)

Ballerina 2201.9.0 (Swan Lake Update 9) SNAPSHOT

OS, DB, other environment details and versions

No response

Related area

-> Runtime

Related issue(s) (optional)

No response

Suggested label(s) (optional)

No response

Suggested assignee(s) (optional)

No response

Thushara-Piyasekara avatar Mar 28 '24 05:03 Thushara-Piyasekara