mirror of https://github.com/apache/lucene.git
SOLR-12823: fix failures in CloudHttp2SolrClientTest CloudSolrClientTest TestCloudSolrClientConnections (#1565)
Co-authored-by: Ilan Ginzburg <iginzburg@salesforce.com>
This commit is contained in:
parent
07a203628e
commit
b4dcbfa3de
|
@ -476,6 +476,7 @@ public class ZkStateReader implements SolrCloseable {
|
||||||
|
|
||||||
log.debug("Updating cluster state from ZooKeeper... ");
|
log.debug("Updating cluster state from ZooKeeper... ");
|
||||||
|
|
||||||
|
try {
|
||||||
// on reconnect of SolrZkClient force refresh and re-add watches.
|
// on reconnect of SolrZkClient force refresh and re-add watches.
|
||||||
loadClusterProperties();
|
loadClusterProperties();
|
||||||
refreshLiveNodes(new LiveNodeWatcher());
|
refreshLiveNodes(new LiveNodeWatcher());
|
||||||
|
@ -497,6 +498,10 @@ public class ZkStateReader implements SolrCloseable {
|
||||||
collectionPropsObservers.forEach((k, v) -> {
|
collectionPropsObservers.forEach((k, v) -> {
|
||||||
collectionPropsWatchers.computeIfAbsent(k, PropsWatcher::new).refreshAndWatch(true);
|
collectionPropsWatchers.computeIfAbsent(k, PropsWatcher::new).refreshAndWatch(true);
|
||||||
});
|
});
|
||||||
|
} catch (KeeperException.NoNodeException nne) {
|
||||||
|
throw new SolrException(ErrorCode.SERVICE_UNAVAILABLE,
|
||||||
|
"Cannot connect to cluster at " + zkClient.getZkServerAddress() + ": cluster not found/not ready");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void addSecurityNodeWatcher(final Callable<Pair<byte[], Stat>> callback)
|
private void addSecurityNodeWatcher(final Callable<Pair<byte[], Stat>> callback)
|
||||||
|
|
|
@ -777,7 +777,6 @@ public class CloudHttp2SolrClientTest extends SolrCloudTestCase {
|
||||||
public ExpectedException exception = ExpectedException.none();
|
public ExpectedException exception = ExpectedException.none();
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@AwaitsFix(bugUrl = "https://issues.apache.org/jira/browse/SOLR-12823")
|
|
||||||
public void testWrongZkChrootTest() throws IOException {
|
public void testWrongZkChrootTest() throws IOException {
|
||||||
|
|
||||||
exception.expect(SolrException.class);
|
exception.expect(SolrException.class);
|
||||||
|
|
|
@ -761,7 +761,6 @@ public class CloudSolrClientTest extends SolrCloudTestCase {
|
||||||
public ExpectedException exception = ExpectedException.none();
|
public ExpectedException exception = ExpectedException.none();
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@AwaitsFix(bugUrl = "https://issues.apache.org/jira/browse/SOLR-12823")
|
|
||||||
public void testWrongZkChrootTest() throws IOException {
|
public void testWrongZkChrootTest() throws IOException {
|
||||||
try (CloudSolrClient client = getCloudSolrClient(cluster.getZkServer().getZkAddress() + "/xyz/foo")) {
|
try (CloudSolrClient client = getCloudSolrClient(cluster.getZkServer().getZkAddress() + "/xyz/foo")) {
|
||||||
client.setZkClientTimeout(1000 * 60);
|
client.setZkClientTimeout(1000 * 60);
|
||||||
|
|
|
@ -31,7 +31,6 @@ import org.junit.Test;
|
||||||
public class TestCloudSolrClientConnections extends SolrTestCaseJ4 {
|
public class TestCloudSolrClientConnections extends SolrTestCaseJ4 {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@AwaitsFix(bugUrl = "https://issues.apache.org/jira/browse/SOLR-12823")
|
|
||||||
public void testCloudClientCanConnectAfterClusterComesUp() throws Exception {
|
public void testCloudClientCanConnectAfterClusterComesUp() throws Exception {
|
||||||
|
|
||||||
// Start by creating a cluster with no jetties
|
// Start by creating a cluster with no jetties
|
||||||
|
@ -59,7 +58,6 @@ public class TestCloudSolrClientConnections extends SolrTestCaseJ4 {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@AwaitsFix(bugUrl = "https://issues.apache.org/jira/browse/SOLR-12823")
|
|
||||||
public void testCloudClientUploads() throws Exception {
|
public void testCloudClientUploads() throws Exception {
|
||||||
|
|
||||||
Path configPath = getFile("solrj").toPath().resolve("solr/configsets/configset-2/conf");
|
Path configPath = getFile("solrj").toPath().resolve("solr/configsets/configset-2/conf");
|
||||||
|
|
Loading…
Reference in New Issue