Description
Describe the bug
The first time I try to run tests in playback mode for a library that has had its test recordings migrated to the new assets repo, only one client out of two I have will succeed in running said tests and the other will fail with the following message:
Exception or Stack Trace
java.lang.RuntimeException: Could not save test proxy download
at com.azure.core.test.utils.TestProxyDownloader.downloadProxy(TestProxyDownloader.java:138)
at com.azure.core.test.utils.TestProxyDownloader.installTestProxy(TestProxyDownloader.java:56)
at com.azure.core.test.utils.TestProxyManager.<init>(TestProxyManager.java:37)
at com.azure.core.test.TestProxyTestBase.setupTestProxy(TestProxyTestBase.java:45)
... 36 more
Caused by: java.nio.file.FileAlreadyExistsException: C:\Users\<My-Username>\AppData\Local\Temp\testproxy.zip
at java.base/sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:87)
at java.base/sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:103)
at java.base/sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:108)
at java.base/sun.nio.fs.WindowsFileSystemProvider.newByteChannel(WindowsFileSystemProvider.java:236)
at java.base/java.nio.file.spi.FileSystemProvider.newOutputStream(FileSystemProvider.java:484)
at java.base/java.nio.file.Files.newOutputStream(Files.java:228)
at java.base/java.nio.file.Files.copy(Files.java:3161)
at com.azure.core.test.utils.TestProxyDownloader.downloadProxy(TestProxyDownloader.java:134)
... 39 more
To Reproduce
Delete your local .assets
folder and try to run the Maps Geolocation package's tests in playback mode from the sdk/maps/azure-maps-geolocation/src/test/java
path.
Code Snippet
N/A
Expected behavior
You should be able to run all tests at once even if assets have not been downloaded beforehand.
Screenshots
N/A
Setup (please complete the following information):
- OS: Windows 11
- IDE: IntelliJ
- Library/Libraries: com.azure:azure-core-test:1.18.0
- Java version: 11
- App Server/Environment: N/A
- Frameworks: N/A
If you suspect a dependency version mismatch (e.g. you see NoClassDefFoundError
, NoSuchMethodError
or similar), please check out Troubleshoot dependency version conflict article first. If it doesn't provide solution for the problem, please provide:
- verbose dependency tree (
mvn dependency:tree -Dverbose
) - exception message, full stack trace, and any available logs
Additional context
N/A
Information Checklist
Kindly make sure that you have added all the following information above and checkoff the required fields otherwise we will treat the issuer as an incomplete report
- Bug Description Added
- Repro Steps Added
- Setup information Added
Metadata
Metadata
Assignees
Labels
Type
Projects
Status