You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@solr.apache.org by md...@apache.org on 2022/08/15 16:21:02 UTC
[solr] branch main updated: SOLR-16329 Specifying s3.conf file breaks unit tests on Windows (#967)
This is an automated email from the ASF dual-hosted git repository.
mdrob pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/solr.git
The following commit(s) were added to refs/heads/main by this push:
new 8506a9a2c88 SOLR-16329 Specifying s3.conf file breaks unit tests on Windows (#967)
8506a9a2c88 is described below
commit 8506a9a2c885495743289d72d83a1c2d6da4229c
Author: Mike Drob <md...@apache.org>
AuthorDate: Mon Aug 15 11:20:55 2022 -0500
SOLR-16329 Specifying s3.conf file breaks unit tests on Windows (#967)
---
.../src/test/org/apache/solr/s3/AbstractS3ClientTest.java | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/solr/modules/s3-repository/src/test/org/apache/solr/s3/AbstractS3ClientTest.java b/solr/modules/s3-repository/src/test/org/apache/solr/s3/AbstractS3ClientTest.java
index 048c90c4c6b..f40c6b9696d 100644
--- a/solr/modules/s3-repository/src/test/org/apache/solr/s3/AbstractS3ClientTest.java
+++ b/solr/modules/s3-repository/src/test/org/apache/solr/s3/AbstractS3ClientTest.java
@@ -19,8 +19,10 @@ package org.apache.solr.s3;
import com.adobe.testing.s3mock.junit4.S3MockRule;
import java.io.IOException;
import java.io.OutputStream;
+import java.net.URI;
import java.net.URISyntaxException;
import java.nio.charset.Charset;
+import java.nio.file.Path;
import org.apache.commons.io.IOUtils;
import org.apache.solr.SolrTestCaseJ4;
import org.junit.After;
@@ -62,8 +64,8 @@ public class AbstractS3ClientTest extends SolrTestCaseJ4 {
* user's ~/.aws/config or credentials
*/
public static void setS3ConfFile() throws URISyntaxException {
- String emptyFile =
- S3IncrementalBackupTest.class.getClassLoader().getResource("s3.conf").toURI().getPath();
+ URI conf = S3IncrementalBackupTest.class.getClassLoader().getResource("s3.conf").toURI();
+ String emptyFile = Path.of(conf).toString();
System.setProperty(ProfileFileSystemSetting.AWS_CONFIG_FILE.property(), emptyFile);
System.setProperty(ProfileFileSystemSetting.AWS_SHARED_CREDENTIALS_FILE.property(), emptyFile);
}