SOLR-11198: fix test failures

This commit is contained in:
Erick Erickson 2017-08-07 09:57:27 -07:00
parent bd5c09b1ee
commit 53db72c598
2 changed files with 0 additions and 15 deletions

View File

@ -21,7 +21,6 @@ import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.IOException;
import java.io.PrintStream;
import java.lang.invoke.MethodHandles;
import java.nio.charset.Charset;
import java.nio.charset.StandardCharsets;
import java.nio.file.FileVisitResult;
@ -41,13 +40,9 @@ import org.apache.zookeeper.data.Stat;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class SolrCLIZkUtilsTest extends SolrCloudTestCase {
private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
@BeforeClass
public static void setupCluster() throws Exception {
configureCluster(1)
@ -451,11 +446,6 @@ public class SolrCLIZkUtilsTest extends SolrCloudTestCase {
assertEquals("Copy should have succeeded.", 0, res);
Path locEmpty = Paths.get(tmp2.toAbsolutePath().toString(), "stopwords", "emptyfile");
log.info("EOE Checking file at (var1) " + locEmpty.toAbsolutePath().toString()); // TODO: remove me EOE
log.info("EOE Checking file at (var2) " + locEmpty.toFile().getAbsolutePath()); // TODO: remove me EOE
log.info("EOE Checking file exists: " + Boolean.toString(locEmpty.toFile().exists()));
log.info("EOE Checking isFile: " + Boolean.toString(locEmpty.toFile().isFile()));
log.info("EOE Checking isDirectory: " + Boolean.toString(locEmpty.toFile().isDirectory())); //TODO: remove me EOE to here.
assertTrue("Empty files should NOT be copied down as directories", locEmpty.toFile().isFile());
}

View File

@ -314,12 +314,7 @@ public class ZkMaintenanceUtils {
// If we didn't copy data down, then we also didn't create the file. But we still need a marker on the local
// disk so create an empty file.
if (copyDataDown(zkClient, zkPath, file.toFile()) == 0) {
log.info("EOE Creating file at (var 1)" + file.toAbsolutePath().toString()); // TODO remove me EOE
log.info("EOE Creating file at (var2) " + file.toFile().getAbsolutePath()); // TODO remove me EOE
Files.createFile(file);
log.info("EOE Creating file exists: " + Boolean.toString(file.toFile().exists()));
log.info("EOE Creating isFile: " + Boolean.toString(file.toFile().isFile()));
log.info("EOE Creating isDirectory: " + Boolean.toString(file.toFile().isDirectory())); //TODO: remove me EOE to here.
}
} else {
Files.createDirectories(file); // Make parent dir.