spring-cloud-contract Error Reported in the GitStubDownloaderTest Case
Symptom
During compilation and installation, the message "Caused by: java.nio.file.NoSuchFileException: /tmp/git-contracts-1590371014299-0/.git/gc.log.lock" is reported in the GitStubDownloaderTest case.
Key Process and Cause Analysis
This problem is caused by running exception of garbage collection (GC). Disable GC to solve this problem.
Conclusion and Solution
- Open the GitStubDownloaderTests.java file.
vim spring-cloud-contract-stub-runner/src/test/java/org/springframework/cloud/contract/stubrunner/GitStubDownloaderTests.java
- Search map for props(), and add the following content:
map.put("gc.auto", "0"); map.put("gc.autoPackLimit", "0"); map.put("receive.autogc", "false");
- Press Esc, type :wq!, and press Enter to save the file and exit.
- Run the compile command again.
./mvnw clean install -Dgpg.skip=true
Parent topic: Troubleshooting