This is an automated email from the ASF dual-hosted git repository.
brandonwilliams pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/cassandra.git
The following commit(s) were added to refs/heads/trunk by this push:
new 3e6bbfb fix bad merge
3e6bbfb is described below
commit 3e6bbfb854697791be55c13ed3bfa578e400c9b4
Author: Brandon Williams <[email protected]>
AuthorDate: Wed Mar 2 08:28:35 2022 -0600
fix bad merge
---
.../test/SSTableLoaderEncryptionOptionsTest.java | 23 ++++++++++++----------
1 file changed, 13 insertions(+), 10 deletions(-)
diff --git
a/test/distributed/org/apache/cassandra/distributed/test/SSTableLoaderEncryptionOptionsTest.java
b/test/distributed/org/apache/cassandra/distributed/test/SSTableLoaderEncryptionOptionsTest.java
index 0da279e..352da02 100644
---
a/test/distributed/org/apache/cassandra/distributed/test/SSTableLoaderEncryptionOptionsTest.java
+++
b/test/distributed/org/apache/cassandra/distributed/test/SSTableLoaderEncryptionOptionsTest.java
@@ -19,7 +19,6 @@
package org.apache.cassandra.distributed.test;
import java.io.IOException;
-import java.io.File;
import java.util.Collections;
import java.util.List;
@@ -33,6 +32,7 @@ import org.apache.cassandra.config.DatabaseDescriptor;
import org.apache.cassandra.db.Keyspace;
import org.apache.cassandra.distributed.Cluster;
import org.apache.cassandra.distributed.api.Feature;
+import org.apache.cassandra.io.util.File;
import org.apache.cassandra.tools.BulkLoader;
import org.apache.cassandra.tools.ToolRunner;
import org.apache.cassandra.service.StorageService;
@@ -40,6 +40,7 @@ import org.apache.cassandra.service.StorageService;
import static org.junit.Assert.assertNotEquals;
import static org.junit.Assert.assertTrue;
+import static com.google.common.collect.Lists.transform;
import static org.apache.cassandra.distributed.test.ExecUtil.rethrow;
import static org.apache.cassandra.distributed.shared.AssertUtils.assertRows;
import static org.apache.cassandra.distributed.shared.AssertUtils.row;
@@ -92,7 +93,7 @@ public class SSTableLoaderEncryptionOptionsTest extends
AbstractEncryptionOption
"--truststore",
validTrustStorePath,
"--truststore-password", validTrustStorePassword,
"--conf-path",
"test/conf/sstableloader_with_encryption.yaml",
-
sstables_to_upload.getAbsolutePath());
+
sstables_to_upload.absolutePath());
tool.assertOnCleanExit();
assertTrue(tool.getStdout().contains("Summary statistics"));
assertRows(CLUSTER.get(1).executeInternal("SELECT count(*) FROM
ssl_upload_tables.test"), row(42L));
@@ -143,16 +144,18 @@ public class SSTableLoaderEncryptionOptionsTest extends
AbstractEncryptionOption
private static File copySstablesFromDataDir(String table) throws
IOException
{
File cfDir = new File("build/test/cassandra/ssl_upload_tables", table);
- cfDir.mkdirs();
- List<File> keyspace_dirs = CLUSTER.get(1).callOnInstance(() ->
Keyspace.open("ssl_upload_tables").getColumnFamilyStore(table).getDirectories().getCFDirectories());
- for (File srcDir : keyspace_dirs)
+ cfDir.tryCreateDirectories();
+ // Get paths as Strings, because org.apache.cassandra.io.util.File in
the dtest
+ // node is loaded by
org.apache.cassandra.distributed.shared.InstanceClassLoader.
+ List<String> keyspace_dir_paths = CLUSTER.get(1).callOnInstance(() -> {
+ List<File> cfDirs =
Keyspace.open("ssl_upload_tables").getColumnFamilyStore(table).getDirectories().getCFDirectories();
+ return transform(cfDirs, (d) -> d.absolutePath());
+ });
+ for (File srcDir : transform(keyspace_dir_paths, (p) -> new File(p)))
{
- for (File file : srcDir.listFiles())
+ for (File file : srcDir.tryList((file) -> file.isFile()))
{
- if (file.isFile())
- {
- FileUtils.copyFileToDirectory(file, cfDir);
- }
+ FileUtils.copyFileToDirectory(file.toJavaIOFile(),
cfDir.toJavaIOFile());
}
}
return cfDir;
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]