You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by sa...@apache.org on 2016/06/18 00:45:47 UTC
[1/4] lucene-solr:branch_5_5: SOLR-9037: replace multiple
"/replication" strings with one static constant
Repository: lucene-solr
Updated Branches:
refs/heads/branch_5_5 1da8709f9 -> 55fe69018
refs/heads/branch_6_0 4639a29b6 -> 4c080207f
SOLR-9037: replace multiple "/replication" strings with one static constant
Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/190069c8
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/190069c8
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/190069c8
Branch: refs/heads/branch_5_5
Commit: 190069c8480063a53b27bf7ad7ef4df4963575b0
Parents: 1da8709
Author: Christine Poerschke <cp...@apache.org>
Authored: Wed Apr 27 13:09:28 2016 +0100
Committer: Steve Rowe <sa...@apache.org>
Committed: Fri Jun 17 20:39:26 2016 -0400
----------------------------------------------------------------------
.../org/apache/solr/cloud/RecoveryStrategy.java | 6 ++---
.../org/apache/solr/core/ImplicitPlugins.java | 2 +-
.../org/apache/solr/handler/IndexFetcher.java | 12 +++++-----
.../apache/solr/handler/ReplicationHandler.java | 2 ++
.../solr/cloud/BasicDistributedZk2Test.java | 3 ++-
...DistribDocExpirationUpdateProcessorTest.java | 3 ++-
.../test/org/apache/solr/core/SolrCoreTest.java | 3 ++-
.../apache/solr/handler/CheckBackupStatus.java | 2 +-
.../solr/handler/TestReplicationHandler.java | 23 ++++++++++++--------
.../handler/TestReplicationHandlerBackup.java | 4 ++--
.../apache/solr/handler/TestRestoreCore.java | 2 +-
.../TestRuleBasedAuthorizationPlugin.java | 5 +++--
12 files changed, 38 insertions(+), 29 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/190069c8/solr/core/src/java/org/apache/solr/cloud/RecoveryStrategy.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/cloud/RecoveryStrategy.java b/solr/core/src/java/org/apache/solr/cloud/RecoveryStrategy.java
index 5daa6af..1d02019 100644
--- a/solr/core/src/java/org/apache/solr/cloud/RecoveryStrategy.java
+++ b/solr/core/src/java/org/apache/solr/cloud/RecoveryStrategy.java
@@ -73,8 +73,6 @@ public class RecoveryStrategy extends Thread implements Closeable {
private static final int WAIT_FOR_UPDATES_WITH_STALE_STATE_PAUSE = Integer.getInteger("solr.cloud.wait-for-updates-with-stale-state-pause", 7000);
private static final int MAX_RETRIES = 500;
private static final int STARTING_RECOVERY_DELAY = 5000;
-
- private static final String REPLICATION_HANDLER = "/replication";
public static interface RecoveryListener {
public void recovered();
@@ -144,12 +142,12 @@ public class RecoveryStrategy extends Thread implements Closeable {
commitOnLeader(leaderUrl);
// use rep handler directly, so we can do this sync rather than async
- SolrRequestHandler handler = core.getRequestHandler(REPLICATION_HANDLER);
+ SolrRequestHandler handler = core.getRequestHandler(ReplicationHandler.PATH);
ReplicationHandler replicationHandler = (ReplicationHandler) handler;
if (replicationHandler == null) {
throw new SolrException(ErrorCode.SERVICE_UNAVAILABLE,
- "Skipping recovery, no " + REPLICATION_HANDLER + " handler found");
+ "Skipping recovery, no " + ReplicationHandler.PATH + " handler found");
}
ModifiableSolrParams solrParams = new ModifiableSolrParams();
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/190069c8/solr/core/src/java/org/apache/solr/core/ImplicitPlugins.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/core/ImplicitPlugins.java b/solr/core/src/java/org/apache/solr/core/ImplicitPlugins.java
index c5de8c2..dcace7d 100644
--- a/solr/core/src/java/org/apache/solr/core/ImplicitPlugins.java
+++ b/solr/core/src/java/org/apache/solr/core/ImplicitPlugins.java
@@ -71,7 +71,7 @@ public class ImplicitPlugins {
}
implicits.add(schema);
//register replicationhandler always for SolrCloud
- implicits.add(getReqHandlerInfo("/replication", ReplicationHandler.class, null));
+ implicits.add(getReqHandlerInfo(ReplicationHandler.PATH, ReplicationHandler.class, null));
implicits.add(getReqHandlerInfo("/get", RealTimeGetHandler.class,
makeMap(
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/190069c8/solr/core/src/java/org/apache/solr/handler/IndexFetcher.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/handler/IndexFetcher.java b/solr/core/src/java/org/apache/solr/handler/IndexFetcher.java
index cdf5cb3..c54b434 100644
--- a/solr/core/src/java/org/apache/solr/handler/IndexFetcher.java
+++ b/solr/core/src/java/org/apache/solr/handler/IndexFetcher.java
@@ -181,9 +181,9 @@ public class IndexFetcher {
if (masterUrl == null)
throw new SolrException(SolrException.ErrorCode.SERVER_ERROR,
"'masterUrl' is required for a slave");
- if (masterUrl.endsWith("/replication")) {
+ if (masterUrl.endsWith(ReplicationHandler.PATH)) {
masterUrl = masterUrl.substring(0, masterUrl.length()-12);
- LOG.warn("'masterUrl' must be specified without the /replication suffix");
+ LOG.warn("'masterUrl' must be specified without the "+ReplicationHandler.PATH+" suffix");
}
this.masterUrl = masterUrl;
@@ -206,7 +206,7 @@ public class IndexFetcher {
ModifiableSolrParams params = new ModifiableSolrParams();
params.set(COMMAND, CMD_INDEX_VERSION);
params.set(CommonParams.WT, JAVABIN);
- params.set(CommonParams.QT, "/replication");
+ params.set(CommonParams.QT, ReplicationHandler.PATH);
QueryRequest req = new QueryRequest(params);
// TODO modify to use shardhandler
@@ -228,7 +228,7 @@ public class IndexFetcher {
params.set(COMMAND, CMD_GET_FILE_LIST);
params.set(GENERATION, String.valueOf(gen));
params.set(CommonParams.WT, JAVABIN);
- params.set(CommonParams.QT, "/replication");
+ params.set(CommonParams.QT, ReplicationHandler.PATH);
QueryRequest req = new QueryRequest(params);
// TODO modify to use shardhandler
@@ -1447,7 +1447,7 @@ public class IndexFetcher {
// //the method is command=filecontent
params.set(COMMAND, CMD_GET_FILE);
params.set(GENERATION, Long.toString(indexGen));
- params.set(CommonParams.QT, "/replication");
+ params.set(CommonParams.QT, ReplicationHandler.PATH);
//add the version to download. This is used to reserve the download
if (isConf) {
//set cf instead of file for config file
@@ -1581,7 +1581,7 @@ public class IndexFetcher {
ModifiableSolrParams params = new ModifiableSolrParams();
params.set(COMMAND, CMD_DETAILS);
params.set("slave", false);
- params.set(CommonParams.QT, "/replication");
+ params.set(CommonParams.QT, ReplicationHandler.PATH);
// TODO use shardhandler
try (HttpSolrClient client = new HttpSolrClient(masterUrl, myHttpClient)) {
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/190069c8/solr/core/src/java/org/apache/solr/handler/ReplicationHandler.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/handler/ReplicationHandler.java b/solr/core/src/java/org/apache/solr/handler/ReplicationHandler.java
index db10969..7c75e99 100644
--- a/solr/core/src/java/org/apache/solr/handler/ReplicationHandler.java
+++ b/solr/core/src/java/org/apache/solr/handler/ReplicationHandler.java
@@ -115,6 +115,8 @@ import static org.apache.solr.common.params.CommonParams.NAME;
*/
public class ReplicationHandler extends RequestHandlerBase implements SolrCoreAware {
+ public static final String PATH = "/replication";
+
private static final Logger LOG = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
SolrCore core;
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/190069c8/solr/core/src/test/org/apache/solr/cloud/BasicDistributedZk2Test.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/cloud/BasicDistributedZk2Test.java b/solr/core/src/test/org/apache/solr/cloud/BasicDistributedZk2Test.java
index a042501..02d1a72 100644
--- a/solr/core/src/test/org/apache/solr/cloud/BasicDistributedZk2Test.java
+++ b/solr/core/src/test/org/apache/solr/cloud/BasicDistributedZk2Test.java
@@ -42,6 +42,7 @@ import org.apache.solr.common.cloud.ZkStateReader;
import org.apache.solr.common.params.CommonParams;
import org.apache.solr.common.params.ModifiableSolrParams;
import org.apache.solr.handler.CheckBackupStatus;
+import org.apache.solr.handler.ReplicationHandler;
import org.junit.Test;
/**
@@ -400,7 +401,7 @@ public class BasicDistributedZk2Test extends AbstractFullDistribZkTestBase {
// try a backup command
final HttpSolrClient client = (HttpSolrClient) shardToJetty.get(SHARD2).get(0).client.solrClient;
ModifiableSolrParams params = new ModifiableSolrParams();
- params.set("qt", "/replication");
+ params.set("qt", ReplicationHandler.PATH);
params.set("command", "backup");
Path location = createTempDir();
location = FilterPath.unwrap(location).toRealPath();
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/190069c8/solr/core/src/test/org/apache/solr/cloud/DistribDocExpirationUpdateProcessorTest.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/cloud/DistribDocExpirationUpdateProcessorTest.java b/solr/core/src/test/org/apache/solr/cloud/DistribDocExpirationUpdateProcessorTest.java
index 6be317f..eaf2460 100644
--- a/solr/core/src/test/org/apache/solr/cloud/DistribDocExpirationUpdateProcessorTest.java
+++ b/solr/core/src/test/org/apache/solr/cloud/DistribDocExpirationUpdateProcessorTest.java
@@ -20,6 +20,7 @@ import org.apache.lucene.util.LuceneTestCase.Slow;
import org.apache.solr.client.solrj.SolrServerException;
import org.apache.solr.client.solrj.request.QueryRequest;
import org.apache.solr.common.util.NamedList;
+import org.apache.solr.handler.ReplicationHandler;
import org.apache.solr.common.params.SolrParams;
import org.apache.solr.common.params.ModifiableSolrParams;
@@ -140,7 +141,7 @@ public class DistribDocExpirationUpdateProcessorTest extends AbstractFullDistrib
ModifiableSolrParams params = new ModifiableSolrParams();
params.set("command","indexversion");
params.set("_trace","getIndexVersion");
- params.set("qt","/replication");
+ params.set("qt",ReplicationHandler.PATH);
QueryRequest req = new QueryRequest(params);
NamedList<Object> res = replicaRunner.client.solrClient.request(req);
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/190069c8/solr/core/src/test/org/apache/solr/core/SolrCoreTest.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/core/SolrCoreTest.java b/solr/core/src/test/org/apache/solr/core/SolrCoreTest.java
index 0c1091e..3248fd9 100644
--- a/solr/core/src/test/org/apache/solr/core/SolrCoreTest.java
+++ b/solr/core/src/test/org/apache/solr/core/SolrCoreTest.java
@@ -19,6 +19,7 @@ package org.apache.solr.core;
import org.apache.solr.SolrTestCaseJ4;
import org.apache.solr.common.SolrException;
import org.apache.solr.common.util.ExecutorUtil;
+import org.apache.solr.handler.ReplicationHandler;
import org.apache.solr.handler.RequestHandlerBase;
import org.apache.solr.handler.component.QueryComponent;
import org.apache.solr.handler.component.SpellCheckComponent;
@@ -97,7 +98,7 @@ public class SolrCoreTest extends SolrTestCaseJ4 {
++ihCount; assertEquals(pathToClassMap.get("/admin/threads"), "org.apache.solr.handler.admin.ThreadDumpHandler");
++ihCount; assertEquals(pathToClassMap.get("/config"), "org.apache.solr.handler.SolrConfigHandler");
++ihCount; assertEquals(pathToClassMap.get("/get"), "org.apache.solr.handler.RealTimeGetHandler");
- ++ihCount; assertEquals(pathToClassMap.get("/replication"), "org.apache.solr.handler.ReplicationHandler");
+ ++ihCount; assertEquals(pathToClassMap.get(ReplicationHandler.PATH), "org.apache.solr.handler.ReplicationHandler");
++ihCount; assertEquals(pathToClassMap.get("/schema"), "org.apache.solr.handler.SchemaHandler");
++ihCount; assertEquals(pathToClassMap.get("/update"), "org.apache.solr.handler.UpdateRequestHandler");
++ihCount; assertEquals(pathToClassMap.get("/update/csv"), "org.apache.solr.handler.UpdateRequestHandler");
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/190069c8/solr/core/src/test/org/apache/solr/handler/CheckBackupStatus.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/handler/CheckBackupStatus.java b/solr/core/src/test/org/apache/solr/handler/CheckBackupStatus.java
index ab1d553..706a2fe 100644
--- a/solr/core/src/test/org/apache/solr/handler/CheckBackupStatus.java
+++ b/solr/core/src/test/org/apache/solr/handler/CheckBackupStatus.java
@@ -44,7 +44,7 @@ public class CheckBackupStatus extends SolrTestCaseJ4 {
}
public void fetchStatus() throws IOException {
- String masterUrl = client.getBaseURL() + "/replication?command=" + ReplicationHandler.CMD_DETAILS;
+ String masterUrl = client.getBaseURL() + ReplicationHandler.PATH + "?command=" + ReplicationHandler.CMD_DETAILS;
response = client.getHttpClient().execute(new HttpGet(masterUrl), new BasicResponseHandler());
if(pException.matcher(response).find()) {
fail("Failed to create backup");
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/190069c8/solr/core/src/test/org/apache/solr/handler/TestReplicationHandler.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/handler/TestReplicationHandler.java b/solr/core/src/test/org/apache/solr/handler/TestReplicationHandler.java
index 2facd52..b997ad4 100644
--- a/solr/core/src/test/org/apache/solr/handler/TestReplicationHandler.java
+++ b/solr/core/src/test/org/apache/solr/handler/TestReplicationHandler.java
@@ -209,7 +209,7 @@ public class TestReplicationHandler extends SolrTestCaseJ4 {
ModifiableSolrParams params = new ModifiableSolrParams();
params.set("command","details");
params.set("_trace","getDetails");
- params.set("qt","/replication");
+ params.set("qt",ReplicationHandler.PATH);
QueryRequest req = new QueryRequest(params);
NamedList<Object> res = s.request(req);
@@ -230,7 +230,7 @@ public class TestReplicationHandler extends SolrTestCaseJ4 {
ModifiableSolrParams params = new ModifiableSolrParams();
params.set("command","commits");
params.set("_trace","getCommits");
- params.set("qt","/replication");
+ params.set("qt",ReplicationHandler.PATH);
QueryRequest req = new QueryRequest(params);
NamedList<Object> res = s.request(req);
@@ -246,7 +246,7 @@ public class TestReplicationHandler extends SolrTestCaseJ4 {
ModifiableSolrParams params = new ModifiableSolrParams();
params.set("command","indexversion");
params.set("_trace","getIndexVersion");
- params.set("qt","/replication");
+ params.set("qt",ReplicationHandler.PATH);
QueryRequest req = new QueryRequest(params);
NamedList<Object> res = s.request(req);
@@ -279,6 +279,11 @@ public class TestReplicationHandler extends SolrTestCaseJ4 {
}
@Test
+ public void doTestHandlerPathUnchanged() throws Exception {
+ assertEquals("/replication", ReplicationHandler.PATH);
+ }
+
+ @Test
public void doTestDetails() throws Exception {
clearIndexWithReplication();
{
@@ -450,7 +455,7 @@ public class TestReplicationHandler extends SolrTestCaseJ4 {
//jetty servers.
private void invokeReplicationCommand(int pJettyPort, String pCommand) throws IOException
{
- String masterUrl = buildUrl(pJettyPort) + "/" + DEFAULT_TEST_CORENAME + "/replication?command=" + pCommand;
+ String masterUrl = buildUrl(pJettyPort) + "/" + DEFAULT_TEST_CORENAME + ReplicationHandler.PATH+"?command=" + pCommand;
URL u = new URL(masterUrl);
InputStream stream = u.openStream();
stream.close();
@@ -685,8 +690,8 @@ public class TestReplicationHandler extends SolrTestCaseJ4 {
assertEquals(nDocs, masterQueryResult.getNumFound());
// index fetch
- String masterUrl = buildUrl(slaveJetty.getLocalPort()) + "/" + DEFAULT_TEST_CORENAME + "/replication?command=fetchindex&masterUrl=";
- masterUrl += buildUrl(masterJetty.getLocalPort()) + "/" + DEFAULT_TEST_CORENAME + "/replication";
+ String masterUrl = buildUrl(slaveJetty.getLocalPort()) + "/" + DEFAULT_TEST_CORENAME + ReplicationHandler.PATH+"?command=fetchindex&masterUrl=";
+ masterUrl += buildUrl(masterJetty.getLocalPort()) + "/" + DEFAULT_TEST_CORENAME + ReplicationHandler.PATH;
URL url = new URL(masterUrl);
InputStream stream = url.openStream();
stream.close();
@@ -1000,7 +1005,7 @@ public class TestReplicationHandler extends SolrTestCaseJ4 {
// check vs /replication?command=indexversion call
ModifiableSolrParams params = new ModifiableSolrParams();
- params.set("qt", "/replication");
+ params.set("qt", ReplicationHandler.PATH);
params.set("_trace", "assertVersions");
params.set("command", "indexversion");
QueryRequest req = new QueryRequest(params);
@@ -1039,9 +1044,9 @@ public class TestReplicationHandler extends SolrTestCaseJ4 {
InputStream stream;
masterUrl = buildUrl(to.getLocalPort())
+ "/" + DEFAULT_TEST_CORENAME
- + "/replication?wait=true&command=fetchindex&masterUrl="
+ + ReplicationHandler.PATH+"?wait=true&command=fetchindex&masterUrl="
+ buildUrl(from.getLocalPort())
- + "/" + DEFAULT_TEST_CORENAME + "/replication";
+ + "/" + DEFAULT_TEST_CORENAME + ReplicationHandler.PATH;
url = new URL(masterUrl);
stream = url.openStream();
stream.close();
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/190069c8/solr/core/src/test/org/apache/solr/handler/TestReplicationHandlerBackup.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/handler/TestReplicationHandlerBackup.java b/solr/core/src/test/org/apache/solr/handler/TestReplicationHandlerBackup.java
index 83f4b41..c4c6d6a 100644
--- a/solr/core/src/test/org/apache/solr/handler/TestReplicationHandlerBackup.java
+++ b/solr/core/src/test/org/apache/solr/handler/TestReplicationHandlerBackup.java
@@ -269,7 +269,7 @@ public class TestReplicationHandlerBackup extends SolrJettyTestBase {
public static void runBackupCommand(JettySolrRunner masterJetty, String cmd, String params) throws IOException {
String masterUrl = buildUrl(masterJetty.getLocalPort(), context) + "/" + DEFAULT_TEST_CORENAME
- + "/replication?command=" + cmd + params;
+ + ReplicationHandler.PATH+"?command=" + cmd + params;
InputStream stream = null;
try {
URL url = new URL(masterUrl);
@@ -292,7 +292,7 @@ public class TestReplicationHandlerBackup extends SolrJettyTestBase {
}
public boolean fetchStatus() throws IOException {
- String masterUrl = buildUrl(masterJetty.getLocalPort(), context) + "/" + DEFAULT_TEST_CORENAME + "/replication?command=" + ReplicationHandler.CMD_DETAILS;
+ String masterUrl = buildUrl(masterJetty.getLocalPort(), context) + "/" + DEFAULT_TEST_CORENAME + ReplicationHandler.PATH + "?command=" + ReplicationHandler.CMD_DETAILS;
URL url;
InputStream stream = null;
try {
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/190069c8/solr/core/src/test/org/apache/solr/handler/TestRestoreCore.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/handler/TestRestoreCore.java b/solr/core/src/test/org/apache/solr/handler/TestRestoreCore.java
index dcad0e4..7d33a0e 100644
--- a/solr/core/src/test/org/apache/solr/handler/TestRestoreCore.java
+++ b/solr/core/src/test/org/apache/solr/handler/TestRestoreCore.java
@@ -227,7 +227,7 @@ public class TestRestoreCore extends SolrJettyTestBase {
private boolean fetchRestoreStatus() throws IOException {
String masterUrl = buildUrl(masterJetty.getLocalPort(), context) + "/" + DEFAULT_TEST_CORENAME +
- "/replication?command=" + ReplicationHandler.CMD_RESTORE_STATUS;
+ ReplicationHandler.PATH + "?command=" + ReplicationHandler.CMD_RESTORE_STATUS;
final Pattern pException = Pattern.compile("<str name=\"exception\">(.*?)</str>");
InputStream stream = null;
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/190069c8/solr/core/src/test/org/apache/solr/security/TestRuleBasedAuthorizationPlugin.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/security/TestRuleBasedAuthorizationPlugin.java b/solr/core/src/test/org/apache/solr/security/TestRuleBasedAuthorizationPlugin.java
index 62f4db4..2e5dff3 100644
--- a/solr/core/src/test/org/apache/solr/security/TestRuleBasedAuthorizationPlugin.java
+++ b/solr/core/src/test/org/apache/solr/security/TestRuleBasedAuthorizationPlugin.java
@@ -27,6 +27,7 @@ import org.apache.solr.SolrTestCaseJ4;
import org.apache.solr.common.params.MapSolrParams;
import org.apache.solr.common.params.SolrParams;
import org.apache.solr.common.util.Utils;
+import org.apache.solr.handler.ReplicationHandler;
import org.apache.solr.security.AuthorizationContext.CollectionRequest;
import org.apache.solr.security.AuthorizationContext.RequestType;
@@ -162,13 +163,13 @@ public class TestRuleBasedAuthorizationPlugin extends SolrTestCaseJ4 {
((Map)rules.get("user-role")).put("cio","su");
((List)rules.get("permissions")).add( makeMap("name", "all", "role", "su"));
- checkRules(makeMap("resource", "/replication",
+ checkRules(makeMap("resource", ReplicationHandler.PATH,
"httpMethod", "POST",
"userPrincipal", "tim",
"collectionRequests", singletonList(new CollectionRequest("mycoll")) )
, FORBIDDEN, rules);
- checkRules(makeMap("resource", "/replication",
+ checkRules(makeMap("resource", ReplicationHandler.PATH,
"httpMethod", "POST",
"userPrincipal", "cio",
"collectionRequests", singletonList(new CollectionRequest("mycoll")) )
[2/4] lucene-solr:branch_5_5: SOLR-9037: Add 5.5.2 CHANGES entry
Posted by sa...@apache.org.
SOLR-9037: Add 5.5.2 CHANGES entry
Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/55fe6901
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/55fe6901
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/55fe6901
Branch: refs/heads/branch_5_5
Commit: 55fe69018001506286477aa5f67c20a38a7cd01c
Parents: 190069c
Author: Steve Rowe <sa...@apache.org>
Authored: Fri Jun 17 20:41:38 2016 -0400
Committer: Steve Rowe <sa...@apache.org>
Committed: Fri Jun 17 20:41:38 2016 -0400
----------------------------------------------------------------------
solr/CHANGES.txt | 2 ++
1 file changed, 2 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/55fe6901/solr/CHANGES.txt
----------------------------------------------------------------------
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index 8245505..c1683bc 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -106,6 +106,8 @@ Other Changes
* SOLR-8933: Solr should not close container streams. (Mike Drob, Uwe Schindler, Mark Miller)
+* SOLR-9037: Replace multiple "/replication" strings with one static constant. (Christine Poerschke)
+
======================= 5.5.1 =======================
Bug Fixes
[4/4] lucene-solr:branch_6_0: SOLR-9037: Remove misplaced CHANGES
entry
Posted by sa...@apache.org.
SOLR-9037: Remove misplaced CHANGES entry
Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/4c080207
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/4c080207
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/4c080207
Branch: refs/heads/branch_6_0
Commit: 4c080207f27d1c4a44a90f763054ca1db4921bab
Parents: 48c8e19
Author: Steve Rowe <sa...@apache.org>
Authored: Fri Jun 17 20:45:36 2016 -0400
Committer: Steve Rowe <sa...@apache.org>
Committed: Fri Jun 17 20:45:36 2016 -0400
----------------------------------------------------------------------
solr/CHANGES.txt | 2 --
1 file changed, 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/4c080207/solr/CHANGES.txt
----------------------------------------------------------------------
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index 93f0ea1..0bff45f 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -125,8 +125,6 @@ Other Changes
test-framework jar so users subclassing SolrTestCaseJ4 don't need to preserve magic paths.
(hossman)
-* SOLR-9037: Replace multiple "/replication" strings with one static constant. (Christine Poerschke)
-
================== 6.0.0 ==================
Consult the LUCENE_CHANGES.txt file for additional, low level, changes in this release
[3/4] lucene-solr:branch_6_0: SOLR-9037: replace multiple
"/replication" strings with one static constant
Posted by sa...@apache.org.
SOLR-9037: replace multiple "/replication" strings with one static constant
Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/48c8e192
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/48c8e192
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/48c8e192
Branch: refs/heads/branch_6_0
Commit: 48c8e1923f46abaec133a332ec573b4c560148d1
Parents: 4639a29
Author: Christine Poerschke <cp...@apache.org>
Authored: Wed Apr 27 13:09:28 2016 +0100
Committer: Steve Rowe <sa...@apache.org>
Committed: Fri Jun 17 20:44:36 2016 -0400
----------------------------------------------------------------------
solr/CHANGES.txt | 2 ++
.../org/apache/solr/cloud/RecoveryStrategy.java | 6 ++---
.../org/apache/solr/handler/IndexFetcher.java | 12 +++++-----
.../apache/solr/handler/ReplicationHandler.java | 2 ++
.../solr/cloud/BasicDistributedZk2Test.java | 3 ++-
...DistribDocExpirationUpdateProcessorTest.java | 3 ++-
.../test/org/apache/solr/core/SolrCoreTest.java | 3 ++-
.../apache/solr/handler/CheckBackupStatus.java | 2 +-
.../solr/handler/TestReplicationHandler.java | 23 ++++++++++++--------
.../handler/TestReplicationHandlerBackup.java | 4 ++--
.../apache/solr/handler/TestRestoreCore.java | 2 +-
.../TestRuleBasedAuthorizationPlugin.java | 4 ++--
12 files changed, 38 insertions(+), 28 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/48c8e192/solr/CHANGES.txt
----------------------------------------------------------------------
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index 0bff45f..93f0ea1 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -125,6 +125,8 @@ Other Changes
test-framework jar so users subclassing SolrTestCaseJ4 don't need to preserve magic paths.
(hossman)
+* SOLR-9037: Replace multiple "/replication" strings with one static constant. (Christine Poerschke)
+
================== 6.0.0 ==================
Consult the LUCENE_CHANGES.txt file for additional, low level, changes in this release
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/48c8e192/solr/core/src/java/org/apache/solr/cloud/RecoveryStrategy.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/cloud/RecoveryStrategy.java b/solr/core/src/java/org/apache/solr/cloud/RecoveryStrategy.java
index 5daa6af..1d02019 100644
--- a/solr/core/src/java/org/apache/solr/cloud/RecoveryStrategy.java
+++ b/solr/core/src/java/org/apache/solr/cloud/RecoveryStrategy.java
@@ -73,8 +73,6 @@ public class RecoveryStrategy extends Thread implements Closeable {
private static final int WAIT_FOR_UPDATES_WITH_STALE_STATE_PAUSE = Integer.getInteger("solr.cloud.wait-for-updates-with-stale-state-pause", 7000);
private static final int MAX_RETRIES = 500;
private static final int STARTING_RECOVERY_DELAY = 5000;
-
- private static final String REPLICATION_HANDLER = "/replication";
public static interface RecoveryListener {
public void recovered();
@@ -144,12 +142,12 @@ public class RecoveryStrategy extends Thread implements Closeable {
commitOnLeader(leaderUrl);
// use rep handler directly, so we can do this sync rather than async
- SolrRequestHandler handler = core.getRequestHandler(REPLICATION_HANDLER);
+ SolrRequestHandler handler = core.getRequestHandler(ReplicationHandler.PATH);
ReplicationHandler replicationHandler = (ReplicationHandler) handler;
if (replicationHandler == null) {
throw new SolrException(ErrorCode.SERVICE_UNAVAILABLE,
- "Skipping recovery, no " + REPLICATION_HANDLER + " handler found");
+ "Skipping recovery, no " + ReplicationHandler.PATH + " handler found");
}
ModifiableSolrParams solrParams = new ModifiableSolrParams();
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/48c8e192/solr/core/src/java/org/apache/solr/handler/IndexFetcher.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/handler/IndexFetcher.java b/solr/core/src/java/org/apache/solr/handler/IndexFetcher.java
index c172f81..062427e 100644
--- a/solr/core/src/java/org/apache/solr/handler/IndexFetcher.java
+++ b/solr/core/src/java/org/apache/solr/handler/IndexFetcher.java
@@ -189,9 +189,9 @@ public class IndexFetcher {
if (masterUrl == null)
throw new SolrException(SolrException.ErrorCode.SERVER_ERROR,
"'masterUrl' is required for a slave");
- if (masterUrl.endsWith("/replication")) {
+ if (masterUrl.endsWith(ReplicationHandler.PATH)) {
masterUrl = masterUrl.substring(0, masterUrl.length()-12);
- LOG.warn("'masterUrl' must be specified without the /replication suffix");
+ LOG.warn("'masterUrl' must be specified without the "+ReplicationHandler.PATH+" suffix");
}
this.masterUrl = masterUrl;
@@ -214,7 +214,7 @@ public class IndexFetcher {
ModifiableSolrParams params = new ModifiableSolrParams();
params.set(COMMAND, CMD_INDEX_VERSION);
params.set(CommonParams.WT, JAVABIN);
- params.set(CommonParams.QT, "/replication");
+ params.set(CommonParams.QT, ReplicationHandler.PATH);
QueryRequest req = new QueryRequest(params);
// TODO modify to use shardhandler
@@ -236,7 +236,7 @@ public class IndexFetcher {
params.set(COMMAND, CMD_GET_FILE_LIST);
params.set(GENERATION, String.valueOf(gen));
params.set(CommonParams.WT, JAVABIN);
- params.set(CommonParams.QT, "/replication");
+ params.set(CommonParams.QT, ReplicationHandler.PATH);
QueryRequest req = new QueryRequest(params);
// TODO modify to use shardhandler
@@ -1586,7 +1586,7 @@ public class IndexFetcher {
// //the method is command=filecontent
params.set(COMMAND, CMD_GET_FILE);
params.set(GENERATION, Long.toString(indexGen));
- params.set(CommonParams.QT, "/replication");
+ params.set(CommonParams.QT, ReplicationHandler.PATH);
//add the version to download. This is used to reserve the download
params.set(solrParamOutput, fileName);
if (useInternalCompression) {
@@ -1715,7 +1715,7 @@ public class IndexFetcher {
ModifiableSolrParams params = new ModifiableSolrParams();
params.set(COMMAND, CMD_DETAILS);
params.set("slave", false);
- params.set(CommonParams.QT, "/replication");
+ params.set(CommonParams.QT, ReplicationHandler.PATH);
// TODO use shardhandler
try (HttpSolrClient client = new HttpSolrClient(masterUrl, myHttpClient)) {
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/48c8e192/solr/core/src/java/org/apache/solr/handler/ReplicationHandler.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/handler/ReplicationHandler.java b/solr/core/src/java/org/apache/solr/handler/ReplicationHandler.java
index b8c9692..4a4b7ba 100644
--- a/solr/core/src/java/org/apache/solr/handler/ReplicationHandler.java
+++ b/solr/core/src/java/org/apache/solr/handler/ReplicationHandler.java
@@ -117,6 +117,8 @@ import static org.apache.solr.common.params.CommonParams.NAME;
*/
public class ReplicationHandler extends RequestHandlerBase implements SolrCoreAware {
+ public static final String PATH = "/replication";
+
private static final Logger LOG = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
SolrCore core;
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/48c8e192/solr/core/src/test/org/apache/solr/cloud/BasicDistributedZk2Test.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/cloud/BasicDistributedZk2Test.java b/solr/core/src/test/org/apache/solr/cloud/BasicDistributedZk2Test.java
index a042501..02d1a72 100644
--- a/solr/core/src/test/org/apache/solr/cloud/BasicDistributedZk2Test.java
+++ b/solr/core/src/test/org/apache/solr/cloud/BasicDistributedZk2Test.java
@@ -42,6 +42,7 @@ import org.apache.solr.common.cloud.ZkStateReader;
import org.apache.solr.common.params.CommonParams;
import org.apache.solr.common.params.ModifiableSolrParams;
import org.apache.solr.handler.CheckBackupStatus;
+import org.apache.solr.handler.ReplicationHandler;
import org.junit.Test;
/**
@@ -400,7 +401,7 @@ public class BasicDistributedZk2Test extends AbstractFullDistribZkTestBase {
// try a backup command
final HttpSolrClient client = (HttpSolrClient) shardToJetty.get(SHARD2).get(0).client.solrClient;
ModifiableSolrParams params = new ModifiableSolrParams();
- params.set("qt", "/replication");
+ params.set("qt", ReplicationHandler.PATH);
params.set("command", "backup");
Path location = createTempDir();
location = FilterPath.unwrap(location).toRealPath();
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/48c8e192/solr/core/src/test/org/apache/solr/cloud/DistribDocExpirationUpdateProcessorTest.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/cloud/DistribDocExpirationUpdateProcessorTest.java b/solr/core/src/test/org/apache/solr/cloud/DistribDocExpirationUpdateProcessorTest.java
index 6be317f..eaf2460 100644
--- a/solr/core/src/test/org/apache/solr/cloud/DistribDocExpirationUpdateProcessorTest.java
+++ b/solr/core/src/test/org/apache/solr/cloud/DistribDocExpirationUpdateProcessorTest.java
@@ -20,6 +20,7 @@ import org.apache.lucene.util.LuceneTestCase.Slow;
import org.apache.solr.client.solrj.SolrServerException;
import org.apache.solr.client.solrj.request.QueryRequest;
import org.apache.solr.common.util.NamedList;
+import org.apache.solr.handler.ReplicationHandler;
import org.apache.solr.common.params.SolrParams;
import org.apache.solr.common.params.ModifiableSolrParams;
@@ -140,7 +141,7 @@ public class DistribDocExpirationUpdateProcessorTest extends AbstractFullDistrib
ModifiableSolrParams params = new ModifiableSolrParams();
params.set("command","indexversion");
params.set("_trace","getIndexVersion");
- params.set("qt","/replication");
+ params.set("qt",ReplicationHandler.PATH);
QueryRequest req = new QueryRequest(params);
NamedList<Object> res = replicaRunner.client.solrClient.request(req);
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/48c8e192/solr/core/src/test/org/apache/solr/core/SolrCoreTest.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/core/SolrCoreTest.java b/solr/core/src/test/org/apache/solr/core/SolrCoreTest.java
index 9a617a1..37f08d5 100644
--- a/solr/core/src/test/org/apache/solr/core/SolrCoreTest.java
+++ b/solr/core/src/test/org/apache/solr/core/SolrCoreTest.java
@@ -19,6 +19,7 @@ package org.apache.solr.core;
import org.apache.solr.SolrTestCaseJ4;
import org.apache.solr.common.SolrException;
import org.apache.solr.common.util.ExecutorUtil;
+import org.apache.solr.handler.ReplicationHandler;
import org.apache.solr.handler.RequestHandlerBase;
import org.apache.solr.handler.component.QueryComponent;
import org.apache.solr.handler.component.SpellCheckComponent;
@@ -98,7 +99,7 @@ public class SolrCoreTest extends SolrTestCaseJ4 {
++ihCount; assertEquals(pathToClassMap.get("/config"), "solr.SolrConfigHandler");
++ihCount; assertEquals(pathToClassMap.get("/export"), "solr.SearchHandler");
++ihCount; assertEquals(pathToClassMap.get("/get"), "solr.RealTimeGetHandler");
- ++ihCount; assertEquals(pathToClassMap.get("/replication"), "solr.ReplicationHandler");
+ ++ihCount; assertEquals(pathToClassMap.get(ReplicationHandler.PATH), "solr.ReplicationHandler");
++ihCount; assertEquals(pathToClassMap.get("/schema"), "solr.SchemaHandler");
++ihCount; assertEquals(pathToClassMap.get("/sql"), "solr.SQLHandler");
++ihCount; assertEquals(pathToClassMap.get("/stream"), "solr.StreamHandler");
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/48c8e192/solr/core/src/test/org/apache/solr/handler/CheckBackupStatus.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/handler/CheckBackupStatus.java b/solr/core/src/test/org/apache/solr/handler/CheckBackupStatus.java
index ab1d553..706a2fe 100644
--- a/solr/core/src/test/org/apache/solr/handler/CheckBackupStatus.java
+++ b/solr/core/src/test/org/apache/solr/handler/CheckBackupStatus.java
@@ -44,7 +44,7 @@ public class CheckBackupStatus extends SolrTestCaseJ4 {
}
public void fetchStatus() throws IOException {
- String masterUrl = client.getBaseURL() + "/replication?command=" + ReplicationHandler.CMD_DETAILS;
+ String masterUrl = client.getBaseURL() + ReplicationHandler.PATH + "?command=" + ReplicationHandler.CMD_DETAILS;
response = client.getHttpClient().execute(new HttpGet(masterUrl), new BasicResponseHandler());
if(pException.matcher(response).find()) {
fail("Failed to create backup");
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/48c8e192/solr/core/src/test/org/apache/solr/handler/TestReplicationHandler.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/handler/TestReplicationHandler.java b/solr/core/src/test/org/apache/solr/handler/TestReplicationHandler.java
index 526dabe..dfb6e71 100644
--- a/solr/core/src/test/org/apache/solr/handler/TestReplicationHandler.java
+++ b/solr/core/src/test/org/apache/solr/handler/TestReplicationHandler.java
@@ -212,7 +212,7 @@ public class TestReplicationHandler extends SolrTestCaseJ4 {
ModifiableSolrParams params = new ModifiableSolrParams();
params.set("command","details");
params.set("_trace","getDetails");
- params.set("qt","/replication");
+ params.set("qt",ReplicationHandler.PATH);
QueryRequest req = new QueryRequest(params);
NamedList<Object> res = s.request(req);
@@ -233,7 +233,7 @@ public class TestReplicationHandler extends SolrTestCaseJ4 {
ModifiableSolrParams params = new ModifiableSolrParams();
params.set("command","commits");
params.set("_trace","getCommits");
- params.set("qt","/replication");
+ params.set("qt",ReplicationHandler.PATH);
QueryRequest req = new QueryRequest(params);
NamedList<Object> res = s.request(req);
@@ -249,7 +249,7 @@ public class TestReplicationHandler extends SolrTestCaseJ4 {
ModifiableSolrParams params = new ModifiableSolrParams();
params.set("command","indexversion");
params.set("_trace","getIndexVersion");
- params.set("qt","/replication");
+ params.set("qt",ReplicationHandler.PATH);
QueryRequest req = new QueryRequest(params);
NamedList<Object> res = s.request(req);
@@ -282,6 +282,11 @@ public class TestReplicationHandler extends SolrTestCaseJ4 {
}
@Test
+ public void doTestHandlerPathUnchanged() throws Exception {
+ assertEquals("/replication", ReplicationHandler.PATH);
+ }
+
+ @Test
public void doTestDetails() throws Exception {
clearIndexWithReplication();
{
@@ -453,7 +458,7 @@ public class TestReplicationHandler extends SolrTestCaseJ4 {
//jetty servers.
private void invokeReplicationCommand(int pJettyPort, String pCommand) throws IOException
{
- String masterUrl = buildUrl(pJettyPort) + "/" + DEFAULT_TEST_CORENAME + "/replication?command=" + pCommand;
+ String masterUrl = buildUrl(pJettyPort) + "/" + DEFAULT_TEST_CORENAME + ReplicationHandler.PATH+"?command=" + pCommand;
URL u = new URL(masterUrl);
InputStream stream = u.openStream();
stream.close();
@@ -688,8 +693,8 @@ public class TestReplicationHandler extends SolrTestCaseJ4 {
assertEquals(nDocs, masterQueryResult.getNumFound());
// index fetch
- String masterUrl = buildUrl(slaveJetty.getLocalPort()) + "/" + DEFAULT_TEST_CORENAME + "/replication?command=fetchindex&masterUrl=";
- masterUrl += buildUrl(masterJetty.getLocalPort()) + "/" + DEFAULT_TEST_CORENAME + "/replication";
+ String masterUrl = buildUrl(slaveJetty.getLocalPort()) + "/" + DEFAULT_TEST_CORENAME + ReplicationHandler.PATH+"?command=fetchindex&masterUrl=";
+ masterUrl += buildUrl(masterJetty.getLocalPort()) + "/" + DEFAULT_TEST_CORENAME + ReplicationHandler.PATH;
URL url = new URL(masterUrl);
InputStream stream = url.openStream();
stream.close();
@@ -1003,7 +1008,7 @@ public class TestReplicationHandler extends SolrTestCaseJ4 {
// check vs /replication?command=indexversion call
ModifiableSolrParams params = new ModifiableSolrParams();
- params.set("qt", "/replication");
+ params.set("qt", ReplicationHandler.PATH);
params.set("_trace", "assertVersions");
params.set("command", "indexversion");
QueryRequest req = new QueryRequest(params);
@@ -1042,9 +1047,9 @@ public class TestReplicationHandler extends SolrTestCaseJ4 {
InputStream stream;
masterUrl = buildUrl(to.getLocalPort())
+ "/" + DEFAULT_TEST_CORENAME
- + "/replication?wait=true&command=fetchindex&masterUrl="
+ + ReplicationHandler.PATH+"?wait=true&command=fetchindex&masterUrl="
+ buildUrl(from.getLocalPort())
- + "/" + DEFAULT_TEST_CORENAME + "/replication";
+ + "/" + DEFAULT_TEST_CORENAME + ReplicationHandler.PATH;
url = new URL(masterUrl);
stream = url.openStream();
stream.close();
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/48c8e192/solr/core/src/test/org/apache/solr/handler/TestReplicationHandlerBackup.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/handler/TestReplicationHandlerBackup.java b/solr/core/src/test/org/apache/solr/handler/TestReplicationHandlerBackup.java
index 29c0dd7..5b70cb7 100644
--- a/solr/core/src/test/org/apache/solr/handler/TestReplicationHandlerBackup.java
+++ b/solr/core/src/test/org/apache/solr/handler/TestReplicationHandlerBackup.java
@@ -273,7 +273,7 @@ public class TestReplicationHandlerBackup extends SolrJettyTestBase {
public static void runBackupCommand(JettySolrRunner masterJetty, String cmd, String params) throws IOException {
String masterUrl = buildUrl(masterJetty.getLocalPort(), context) + "/" + DEFAULT_TEST_CORENAME
- + "/replication?command=" + cmd + params;
+ + ReplicationHandler.PATH+"?command=" + cmd + params;
InputStream stream = null;
try {
URL url = new URL(masterUrl);
@@ -296,7 +296,7 @@ public class TestReplicationHandlerBackup extends SolrJettyTestBase {
}
public boolean fetchStatus() throws IOException {
- String masterUrl = buildUrl(masterJetty.getLocalPort(), context) + "/" + DEFAULT_TEST_CORENAME + "/replication?command=" + ReplicationHandler.CMD_DETAILS;
+ String masterUrl = buildUrl(masterJetty.getLocalPort(), context) + "/" + DEFAULT_TEST_CORENAME + ReplicationHandler.PATH + "?command=" + ReplicationHandler.CMD_DETAILS;
URL url;
InputStream stream = null;
try {
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/48c8e192/solr/core/src/test/org/apache/solr/handler/TestRestoreCore.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/handler/TestRestoreCore.java b/solr/core/src/test/org/apache/solr/handler/TestRestoreCore.java
index 1218783..2dcf48e 100644
--- a/solr/core/src/test/org/apache/solr/handler/TestRestoreCore.java
+++ b/solr/core/src/test/org/apache/solr/handler/TestRestoreCore.java
@@ -231,7 +231,7 @@ public class TestRestoreCore extends SolrJettyTestBase {
private boolean fetchRestoreStatus() throws IOException {
String masterUrl = buildUrl(masterJetty.getLocalPort(), context) + "/" + DEFAULT_TEST_CORENAME +
- "/replication?command=" + ReplicationHandler.CMD_RESTORE_STATUS;
+ ReplicationHandler.PATH + "?command=" + ReplicationHandler.CMD_RESTORE_STATUS;
final Pattern pException = Pattern.compile("<str name=\"exception\">(.*?)</str>");
InputStream stream = null;
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/48c8e192/solr/core/src/test/org/apache/solr/security/TestRuleBasedAuthorizationPlugin.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/security/TestRuleBasedAuthorizationPlugin.java b/solr/core/src/test/org/apache/solr/security/TestRuleBasedAuthorizationPlugin.java
index 62f4db4..9a3144e 100644
--- a/solr/core/src/test/org/apache/solr/security/TestRuleBasedAuthorizationPlugin.java
+++ b/solr/core/src/test/org/apache/solr/security/TestRuleBasedAuthorizationPlugin.java
@@ -162,13 +162,13 @@ public class TestRuleBasedAuthorizationPlugin extends SolrTestCaseJ4 {
((Map)rules.get("user-role")).put("cio","su");
((List)rules.get("permissions")).add( makeMap("name", "all", "role", "su"));
- checkRules(makeMap("resource", "/replication",
+ checkRules(makeMap("resource", ReplicationHandler.PATH,
"httpMethod", "POST",
"userPrincipal", "tim",
"collectionRequests", singletonList(new CollectionRequest("mycoll")) )
, FORBIDDEN, rules);
- checkRules(makeMap("resource", "/replication",
+ checkRules(makeMap("resource", ReplicationHandler.PATH,
"httpMethod", "POST",
"userPrincipal", "cio",
"collectionRequests", singletonList(new CollectionRequest("mycoll")) )