Test case withAllRequirementsShouldStartWatcherProcess from class SpringBootWatcherIntegrationTest is failing with a message indicating a mismatch between actual and wanted arguments to the process. Here is the complete message:
Argument(s) are different! Wanted:
runtime.exec(
<custom argument matcher>
);
-> at java.base/java.lang.Runtime.exec(Runtime.java:453)
Actual invocations have different arguments:
runtime.exec(
["/Users/{my username}/.sdkman/candidates/java/17.0.5-amzn/bin/java", "-cp", "/private/var/folders/5q/fb9_qmc91h76mqsnyqxnf7x00000gn/T/junit14501484792843800327/target/spring-boot-lib.jar:/private/var/folders/5q/fb9_qmc91h76mqsnyqxnf7x00000gn/T/junit14501484792843800327/target/spring-boot-devtools.jar", "-Dspring.devtools.remote.secret=this-is-a-test", "org.springframework.boot.devtools.RemoteSpringApplication", "http://localhost:59169"]
);
This is because the Java process pertaining to the SpringBoot application uses the real path of jars as the classpath arg. In other words, the temp directory /var/folders/... (which contains jar files) is a symlink and resolves to /private/var/folders/... on MacOS. We might use the real path instead of the absolute path and then compare the args.
Eclipse JKube version
SNAPSHOT
Component
JKube Kit
Apache Maven version
None
Gradle version
None
Steps to reproduce
It requires MacOS
Run tests from SpringBootWatcherIntegrationTest inside jkube-jit module
Observe the error
Expected behavior
Tests inside SpringBootWatcherIntegrationTest should pass on MacOS as well as Linux.
Describe the bug
Test case
withAllRequirementsShouldStartWatcherProcess
from classSpringBootWatcherIntegrationTest
is failing with a message indicating a mismatch between actual and wanted arguments to the process. Here is the complete message:This is because the Java process pertaining to the SpringBoot application uses the real path of jars as the classpath arg. In other words, the temp directory
/var/folders/...
(which contains jar files) is a symlink and resolves to/private/var/folders/...
on MacOS. We might use the real path instead of the absolute path and then compare the args.Eclipse JKube version
SNAPSHOT
Component
JKube Kit
Apache Maven version
None
Gradle version
None
Steps to reproduce
SpringBootWatcherIntegrationTest
insidejkube-jit module
Expected behavior
Tests inside SpringBootWatcherIntegrationTest should pass on MacOS as well as Linux.
Runtime
other (please specify in additional context)
Kubernetes API Server version
1.25.3
Environment
macOS
Eclipse JKube Logs
No response
Sample Reproducer Project
No response
Additional context
No response