mirror of https://github.com/apache/lucene.git
SOLR-6090: Remove unreachable printLayout usage in cloud tests
This commit is contained in:
parent
24ec3bd085
commit
3eb0f7c792
|
@ -178,6 +178,8 @@ Other Changes
|
||||||
|
|
||||||
* SOLR-6677: Reduced logging during Solr startup, moved more logs to DEBUG level (janhoy, Shawn Heisey)
|
* SOLR-6677: Reduced logging during Solr startup, moved more logs to DEBUG level (janhoy, Shawn Heisey)
|
||||||
|
|
||||||
|
* SOLR-6090: Remove unreachable printLayout usage in cloud tests. (Cao Manh Dat via shalin)
|
||||||
|
|
||||||
================== 6.2.1 ==================
|
================== 6.2.1 ==================
|
||||||
|
|
||||||
Bug Fixes
|
Bug Fixes
|
||||||
|
|
|
@ -87,7 +87,6 @@ public class BasicDistributedZkTest extends AbstractFullDistribZkTestBase {
|
||||||
private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
|
private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
|
||||||
|
|
||||||
private static final String DEFAULT_COLLECTION = "collection1";
|
private static final String DEFAULT_COLLECTION = "collection1";
|
||||||
protected static final boolean DEBUG = false;
|
|
||||||
String t1="a_t";
|
String t1="a_t";
|
||||||
String i1="a_i1";
|
String i1="a_i1";
|
||||||
String tlong = "other_tl1";
|
String tlong = "other_tl1";
|
||||||
|
@ -366,10 +365,6 @@ public class BasicDistributedZkTest extends AbstractFullDistribZkTestBase {
|
||||||
testUpdateProcessorsRunOnlyOnce("distrib-dup-test-chain-implicit");
|
testUpdateProcessorsRunOnlyOnce("distrib-dup-test-chain-implicit");
|
||||||
|
|
||||||
testStopAndStartCoresInOneInstance();
|
testStopAndStartCoresInOneInstance();
|
||||||
// Thread.sleep(10000000000L);
|
|
||||||
if (DEBUG) {
|
|
||||||
super.printLayout();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Insure that total docs found is the expected number.
|
// Insure that total docs found is the expected number.
|
||||||
|
|
|
@ -45,8 +45,6 @@ import org.slf4j.LoggerFactory;
|
||||||
public class ClusterStateUpdateTest extends SolrTestCaseJ4 {
|
public class ClusterStateUpdateTest extends SolrTestCaseJ4 {
|
||||||
private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
|
private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
|
||||||
|
|
||||||
private static final boolean VERBOSE = false;
|
|
||||||
|
|
||||||
protected ZkTestServer zkServer;
|
protected ZkTestServer zkServer;
|
||||||
|
|
||||||
protected String zkDir;
|
protected String zkDir;
|
||||||
|
@ -239,9 +237,6 @@ public class ClusterStateUpdateTest extends SolrTestCaseJ4 {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void tearDown() throws Exception {
|
public void tearDown() throws Exception {
|
||||||
if (VERBOSE) {
|
|
||||||
printLayout(zkServer.getZkHost());
|
|
||||||
}
|
|
||||||
container1.shutdown();
|
container1.shutdown();
|
||||||
container2.shutdown();
|
container2.shutdown();
|
||||||
container3.shutdown();
|
container3.shutdown();
|
||||||
|
|
|
@ -65,8 +65,6 @@ public class CustomCollectionTest extends AbstractFullDistribZkTestBase {
|
||||||
|
|
||||||
private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
|
private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
|
||||||
|
|
||||||
private static final boolean DEBUG = false;
|
|
||||||
|
|
||||||
protected String getSolrXml() {
|
protected String getSolrXml() {
|
||||||
return "solr.xml";
|
return "solr.xml";
|
||||||
}
|
}
|
||||||
|
@ -99,9 +97,6 @@ public class CustomCollectionTest extends AbstractFullDistribZkTestBase {
|
||||||
testCustomCollectionsAPI();
|
testCustomCollectionsAPI();
|
||||||
testRouteFieldForHashRouter();
|
testRouteFieldForHashRouter();
|
||||||
testCreateShardRepFactor();
|
testCreateShardRepFactor();
|
||||||
if (DEBUG) {
|
|
||||||
super.printLayout();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -49,9 +49,7 @@ public class LeaderElectionIntegrationTest extends SolrTestCaseJ4 {
|
||||||
private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
|
private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
|
||||||
|
|
||||||
private final static int NUM_SHARD_REPLICAS = 5;
|
private final static int NUM_SHARD_REPLICAS = 5;
|
||||||
|
|
||||||
private static final boolean VERBOSE = false;
|
|
||||||
|
|
||||||
private static final Pattern HOST = Pattern
|
private static final Pattern HOST = Pattern
|
||||||
.compile(".*?\\:(\\d\\d\\d\\d)_.*");
|
.compile(".*?\\:(\\d\\d\\d\\d)_.*");
|
||||||
|
|
||||||
|
@ -173,7 +171,6 @@ public class LeaderElectionIntegrationTest extends SolrTestCaseJ4 {
|
||||||
shard1Ports.remove(leaderPort);
|
shard1Ports.remove(leaderPort);
|
||||||
|
|
||||||
// kill the leader
|
// kill the leader
|
||||||
if (VERBOSE) System.out.println("Killing " + leaderPort);
|
|
||||||
containerMap.get(leaderPort).shutdown();
|
containerMap.get(leaderPort).shutdown();
|
||||||
|
|
||||||
//printLayout(zkServer.getZkAddress());
|
//printLayout(zkServer.getZkAddress());
|
||||||
|
@ -231,7 +228,6 @@ public class LeaderElectionIntegrationTest extends SolrTestCaseJ4 {
|
||||||
// make sure we have waited long enough for the first leader to have come back
|
// make sure we have waited long enough for the first leader to have come back
|
||||||
Thread.sleep(ZkTestServer.TICK_TIME * 2 + 100);
|
Thread.sleep(ZkTestServer.TICK_TIME * 2 + 100);
|
||||||
|
|
||||||
if (VERBOSE) System.out.println("kill everyone");
|
|
||||||
// kill everyone but the first leader that should have reconnected by now
|
// kill everyone but the first leader that should have reconnected by now
|
||||||
for (Map.Entry<Integer,CoreContainer> entry : containerMap.entrySet()) {
|
for (Map.Entry<Integer,CoreContainer> entry : containerMap.entrySet()) {
|
||||||
if (entry.getKey() != leaderPort) {
|
if (entry.getKey() != leaderPort) {
|
||||||
|
@ -270,7 +266,6 @@ public class LeaderElectionIntegrationTest extends SolrTestCaseJ4 {
|
||||||
int leaderPort = 0;
|
int leaderPort = 0;
|
||||||
if (m.matches()) {
|
if (m.matches()) {
|
||||||
leaderPort = Integer.parseInt(m.group(1));
|
leaderPort = Integer.parseInt(m.group(1));
|
||||||
if (VERBOSE) System.out.println("The leader is:" + Integer.parseInt(m.group(1)));
|
|
||||||
} else {
|
} else {
|
||||||
throw new IllegalStateException();
|
throw new IllegalStateException();
|
||||||
}
|
}
|
||||||
|
@ -279,9 +274,6 @@ public class LeaderElectionIntegrationTest extends SolrTestCaseJ4 {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void tearDown() throws Exception {
|
public void tearDown() throws Exception {
|
||||||
if (VERBOSE) {
|
|
||||||
printLayout(zkServer.getZkHost());
|
|
||||||
}
|
|
||||||
|
|
||||||
if (zkClient != null) {
|
if (zkClient != null) {
|
||||||
zkClient.close();
|
zkClient.close();
|
||||||
|
|
|
@ -77,8 +77,7 @@ public class OverseerTest extends SolrTestCaseJ4 {
|
||||||
private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
|
private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
|
||||||
|
|
||||||
static final int TIMEOUT = 30000;
|
static final int TIMEOUT = 30000;
|
||||||
private static final boolean DEBUG = false;
|
|
||||||
|
|
||||||
private List<Overseer> overseers = new ArrayList<>();
|
private List<Overseer> overseers = new ArrayList<>();
|
||||||
private List<ZkStateReader> readers = new ArrayList<>();
|
private List<ZkStateReader> readers = new ArrayList<>();
|
||||||
private List<HttpShardHandlerFactory> httpShardHandlerFactorys = new ArrayList<>();
|
private List<HttpShardHandlerFactory> httpShardHandlerFactorys = new ArrayList<>();
|
||||||
|
@ -286,11 +285,6 @@ public class OverseerTest extends SolrTestCaseJ4 {
|
||||||
assertNotNull(reader.getLeaderUrl(collection, "shard3", 15000));
|
assertNotNull(reader.getLeaderUrl(collection, "shard3", 15000));
|
||||||
|
|
||||||
} finally {
|
} finally {
|
||||||
if (DEBUG) {
|
|
||||||
if (zkController != null) {
|
|
||||||
zkClient.printLayoutToStdOut();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
close(zkClient);
|
close(zkClient);
|
||||||
if (zkController != null) {
|
if (zkController != null) {
|
||||||
zkController.close();
|
zkController.close();
|
||||||
|
@ -360,11 +354,6 @@ public class OverseerTest extends SolrTestCaseJ4 {
|
||||||
assertNotNull(reader.getLeaderUrl("collection2", "shard3", 15000));
|
assertNotNull(reader.getLeaderUrl("collection2", "shard3", 15000));
|
||||||
|
|
||||||
} finally {
|
} finally {
|
||||||
if (DEBUG) {
|
|
||||||
if (zkController != null) {
|
|
||||||
zkClient.printLayoutToStdOut();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
close(zkClient);
|
close(zkClient);
|
||||||
if (zkController != null) {
|
if (zkController != null) {
|
||||||
zkController.close();
|
zkController.close();
|
||||||
|
@ -499,11 +488,6 @@ public class OverseerTest extends SolrTestCaseJ4 {
|
||||||
}
|
}
|
||||||
|
|
||||||
} finally {
|
} finally {
|
||||||
if (DEBUG) {
|
|
||||||
if (controllers[0] != null) {
|
|
||||||
zkClient.printLayoutToStdOut();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
close(zkClient);
|
close(zkClient);
|
||||||
close(overseerClient);
|
close(overseerClient);
|
||||||
close(reader);
|
close(reader);
|
||||||
|
|
|
@ -68,10 +68,6 @@ public class UnloadDistributedZkTest extends BasicDistributedZkTest {
|
||||||
testUnloadLotsOfCores(); // long
|
testUnloadLotsOfCores(); // long
|
||||||
|
|
||||||
testUnloadShardAndCollection();
|
testUnloadShardAndCollection();
|
||||||
|
|
||||||
if (DEBUG) {
|
|
||||||
super.printLayout();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void checkCoreNamePresenceAndSliceCount(String collectionName, String coreName,
|
private void checkCoreNamePresenceAndSliceCount(String collectionName, String coreName,
|
||||||
|
|
|
@ -51,9 +51,7 @@ import org.slf4j.LoggerFactory;
|
||||||
// files - there are a lot of them to upload
|
// files - there are a lot of them to upload
|
||||||
public class ZkCLITest extends SolrTestCaseJ4 {
|
public class ZkCLITest extends SolrTestCaseJ4 {
|
||||||
private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
|
private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
|
||||||
|
|
||||||
private static final boolean VERBOSE = false;
|
|
||||||
|
|
||||||
protected ZkTestServer zkServer;
|
protected ZkTestServer zkServer;
|
||||||
|
|
||||||
protected String zkDir;
|
protected String zkDir;
|
||||||
|
@ -363,9 +361,6 @@ public class ZkCLITest extends SolrTestCaseJ4 {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void tearDown() throws Exception {
|
public void tearDown() throws Exception {
|
||||||
if (VERBOSE) {
|
|
||||||
printLayout(zkServer.getZkHost());
|
|
||||||
}
|
|
||||||
zkClient.close();
|
zkClient.close();
|
||||||
zkServer.shutdown();
|
zkServer.shutdown();
|
||||||
super.tearDown();
|
super.tearDown();
|
||||||
|
|
|
@ -46,8 +46,6 @@ public class ZkControllerTest extends SolrTestCaseJ4 {
|
||||||
|
|
||||||
static final int TIMEOUT = 10000;
|
static final int TIMEOUT = 10000;
|
||||||
|
|
||||||
private static final boolean DEBUG = false;
|
|
||||||
|
|
||||||
@BeforeClass
|
@BeforeClass
|
||||||
public static void beforeClass() throws Exception {
|
public static void beforeClass() throws Exception {
|
||||||
|
|
||||||
|
@ -185,9 +183,6 @@ public class ZkControllerTest extends SolrTestCaseJ4 {
|
||||||
+ COLLECTION_NAME, Utils.toJSON(zkProps),
|
+ COLLECTION_NAME, Utils.toJSON(zkProps),
|
||||||
CreateMode.PERSISTENT, true);
|
CreateMode.PERSISTENT, true);
|
||||||
|
|
||||||
if (DEBUG) {
|
|
||||||
zkClient.printLayoutToStdOut();
|
|
||||||
}
|
|
||||||
zkClient.close();
|
zkClient.close();
|
||||||
|
|
||||||
cc = getCoreContainer();
|
cc = getCoreContainer();
|
||||||
|
|
|
@ -33,7 +33,6 @@ import org.junit.AfterClass;
|
||||||
import org.junit.BeforeClass;
|
import org.junit.BeforeClass;
|
||||||
|
|
||||||
public class ZkSolrClientTest extends AbstractSolrTestCase {
|
public class ZkSolrClientTest extends AbstractSolrTestCase {
|
||||||
private static final boolean DEBUG = false;
|
|
||||||
|
|
||||||
@BeforeClass
|
@BeforeClass
|
||||||
public static void beforeClass() throws Exception {
|
public static void beforeClass() throws Exception {
|
||||||
|
@ -151,10 +150,6 @@ public class ZkSolrClientTest extends AbstractSolrTestCase {
|
||||||
zkClient.makePath("collections/collection3", true);
|
zkClient.makePath("collections/collection3", true);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (DEBUG) {
|
|
||||||
zkClient.printLayoutToStdOut();
|
|
||||||
}
|
|
||||||
|
|
||||||
assertNotNull(zkClient.exists("/collections/collection3", null, true));
|
assertNotNull(zkClient.exists("/collections/collection3", null, true));
|
||||||
assertNotNull(zkClient.exists("/collections/collection1", null, true));
|
assertNotNull(zkClient.exists("/collections/collection1", null, true));
|
||||||
|
|
||||||
|
@ -181,10 +176,6 @@ public class ZkSolrClientTest extends AbstractSolrTestCase {
|
||||||
Thread.sleep(1000 * i);
|
Thread.sleep(1000 * i);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (DEBUG) {
|
|
||||||
zkClient.printLayoutToStdOut();
|
|
||||||
}
|
|
||||||
|
|
||||||
assertNotNull("Node does not exist, but it should", zkClient.exists("/collections/collection4", null, true));
|
assertNotNull("Node does not exist, but it should", zkClient.exists("/collections/collection4", null, true));
|
||||||
|
|
||||||
} finally {
|
} finally {
|
||||||
|
@ -278,9 +269,6 @@ public class ZkSolrClientTest extends AbstractSolrTestCase {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void process(WatchedEvent event) {
|
public void process(WatchedEvent event) {
|
||||||
if (DEBUG) {
|
|
||||||
System.out.println("children changed");
|
|
||||||
}
|
|
||||||
cnt.incrementAndGet();
|
cnt.incrementAndGet();
|
||||||
// remake watch
|
// remake watch
|
||||||
try {
|
try {
|
||||||
|
@ -300,10 +288,6 @@ public class ZkSolrClientTest extends AbstractSolrTestCase {
|
||||||
zkClient.makePath("collections/collection99/config=collection3", true);
|
zkClient.makePath("collections/collection99/config=collection3", true);
|
||||||
|
|
||||||
zkClient.makePath("/collections/collection97/shards", true);
|
zkClient.makePath("/collections/collection97/shards", true);
|
||||||
|
|
||||||
if (DEBUG) {
|
|
||||||
zkClient.printLayoutToStdOut();
|
|
||||||
}
|
|
||||||
|
|
||||||
// pause for the watches to fire
|
// pause for the watches to fire
|
||||||
Thread.sleep(700);
|
Thread.sleep(700);
|
||||||
|
|
|
@ -43,7 +43,6 @@ public abstract class AbstractDistribZkTestBase extends BaseDistributedSearchTes
|
||||||
private static final String ZK_HOST = "zkHost";
|
private static final String ZK_HOST = "zkHost";
|
||||||
private static final String ZOOKEEPER_FORCE_SYNC = "zookeeper.forceSync";
|
private static final String ZOOKEEPER_FORCE_SYNC = "zookeeper.forceSync";
|
||||||
protected static final String DEFAULT_COLLECTION = "collection1";
|
protected static final String DEFAULT_COLLECTION = "collection1";
|
||||||
private static final boolean DEBUG = false;
|
|
||||||
protected ZkTestServer zkServer;
|
protected ZkTestServer zkServer;
|
||||||
private AtomicInteger homeCount = new AtomicInteger();
|
private AtomicInteger homeCount = new AtomicInteger();
|
||||||
|
|
||||||
|
@ -269,9 +268,6 @@ public abstract class AbstractDistribZkTestBase extends BaseDistributedSearchTes
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void distribTearDown() throws Exception {
|
public void distribTearDown() throws Exception {
|
||||||
if (DEBUG) {
|
|
||||||
printLayout();
|
|
||||||
}
|
|
||||||
System.clearProperty(ZK_HOST);
|
System.clearProperty(ZK_HOST);
|
||||||
System.clearProperty("collection");
|
System.clearProperty("collection");
|
||||||
System.clearProperty(ENABLE_UPDATE_LOG);
|
System.clearProperty(ENABLE_UPDATE_LOG);
|
||||||
|
|
|
@ -39,8 +39,6 @@ public abstract class AbstractZkTestCase extends SolrTestCaseJ4 {
|
||||||
|
|
||||||
public static final int TIMEOUT = 45000;
|
public static final int TIMEOUT = 45000;
|
||||||
|
|
||||||
private static final boolean DEBUG = false;
|
|
||||||
|
|
||||||
private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
|
private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
|
||||||
|
|
||||||
|
|
||||||
|
@ -137,10 +135,6 @@ public abstract class AbstractZkTestCase extends SolrTestCaseJ4 {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void tearDown() throws Exception {
|
public void tearDown() throws Exception {
|
||||||
if (DEBUG) {
|
|
||||||
printLayout(zkServer.getZkHost());
|
|
||||||
}
|
|
||||||
|
|
||||||
super.tearDown();
|
super.tearDown();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue