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,27 +476,32 @@ public class ZkStateReader implements SolrCloseable {
|
|||
|
||||
log.debug("Updating cluster state from ZooKeeper... ");
|
||||
|
||||
// on reconnect of SolrZkClient force refresh and re-add watches.
|
||||
loadClusterProperties();
|
||||
refreshLiveNodes(new LiveNodeWatcher());
|
||||
refreshCollections();
|
||||
refreshCollectionList(new CollectionsChildWatcher());
|
||||
refreshAliases(aliasesManager);
|
||||
try {
|
||||
// on reconnect of SolrZkClient force refresh and re-add watches.
|
||||
loadClusterProperties();
|
||||
refreshLiveNodes(new LiveNodeWatcher());
|
||||
refreshCollections();
|
||||
refreshCollectionList(new CollectionsChildWatcher());
|
||||
refreshAliases(aliasesManager);
|
||||
|
||||
if (securityNodeListener != null) {
|
||||
addSecurityNodeWatcher(pair -> {
|
||||
ConfigData cd = new ConfigData();
|
||||
cd.data = pair.first() == null || pair.first().length == 0 ? EMPTY_MAP : Utils.getDeepCopy((Map) fromJSON(pair.first()), 4, false);
|
||||
cd.version = pair.second() == null ? -1 : pair.second().getVersion();
|
||||
securityData = cd;
|
||||
securityNodeListener.run();
|
||||
if (securityNodeListener != null) {
|
||||
addSecurityNodeWatcher(pair -> {
|
||||
ConfigData cd = new ConfigData();
|
||||
cd.data = pair.first() == null || pair.first().length == 0 ? EMPTY_MAP : Utils.getDeepCopy((Map) fromJSON(pair.first()), 4, false);
|
||||
cd.version = pair.second() == null ? -1 : pair.second().getVersion();
|
||||
securityData = cd;
|
||||
securityNodeListener.run();
|
||||
});
|
||||
securityData = getSecurityProps(true);
|
||||
}
|
||||
|
||||
collectionPropsObservers.forEach((k, v) -> {
|
||||
collectionPropsWatchers.computeIfAbsent(k, PropsWatcher::new).refreshAndWatch(true);
|
||||
});
|
||||
securityData = getSecurityProps(true);
|
||||
} catch (KeeperException.NoNodeException nne) {
|
||||
throw new SolrException(ErrorCode.SERVICE_UNAVAILABLE,
|
||||
"Cannot connect to cluster at " + zkClient.getZkServerAddress() + ": cluster not found/not ready");
|
||||
}
|
||||
|
||||
collectionPropsObservers.forEach((k, v) -> {
|
||||
collectionPropsWatchers.computeIfAbsent(k, PropsWatcher::new).refreshAndWatch(true);
|
||||
});
|
||||
}
|
||||
|
||||
private void addSecurityNodeWatcher(final Callable<Pair<byte[], Stat>> callback)
|
||||
|
|
|
@ -777,7 +777,6 @@ public class CloudHttp2SolrClientTest extends SolrCloudTestCase {
|
|||
public ExpectedException exception = ExpectedException.none();
|
||||
|
||||
@Test
|
||||
@AwaitsFix(bugUrl = "https://issues.apache.org/jira/browse/SOLR-12823")
|
||||
public void testWrongZkChrootTest() throws IOException {
|
||||
|
||||
exception.expect(SolrException.class);
|
||||
|
|
|
@ -761,7 +761,6 @@ public class CloudSolrClientTest extends SolrCloudTestCase {
|
|||
public ExpectedException exception = ExpectedException.none();
|
||||
|
||||
@Test
|
||||
@AwaitsFix(bugUrl = "https://issues.apache.org/jira/browse/SOLR-12823")
|
||||
public void testWrongZkChrootTest() throws IOException {
|
||||
try (CloudSolrClient client = getCloudSolrClient(cluster.getZkServer().getZkAddress() + "/xyz/foo")) {
|
||||
client.setZkClientTimeout(1000 * 60);
|
||||
|
|
|
@ -31,7 +31,6 @@ import org.junit.Test;
|
|||
public class TestCloudSolrClientConnections extends SolrTestCaseJ4 {
|
||||
|
||||
@Test
|
||||
@AwaitsFix(bugUrl = "https://issues.apache.org/jira/browse/SOLR-12823")
|
||||
public void testCloudClientCanConnectAfterClusterComesUp() throws Exception {
|
||||
|
||||
// Start by creating a cluster with no jetties
|
||||
|
@ -59,7 +58,6 @@ public class TestCloudSolrClientConnections extends SolrTestCaseJ4 {
|
|||
}
|
||||
|
||||
@Test
|
||||
@AwaitsFix(bugUrl = "https://issues.apache.org/jira/browse/SOLR-12823")
|
||||
public void testCloudClientUploads() throws Exception {
|
||||
|
||||
Path configPath = getFile("solrj").toPath().resolve("solr/configsets/configset-2/conf");
|
||||
|
|
Loading…
Reference in New Issue