mirror of https://github.com/apache/lucene.git
SOLR-6801 version can be string or number
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1652444 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
255961719f
commit
8ee7579302
|
@ -433,14 +433,14 @@ public final class RequestHandlers {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
version = _pluginInfo.attributes.get("version");
|
if (_pluginInfo.attributes.get("version") == null ){
|
||||||
if (version == null) {
|
|
||||||
errMsg = "ERROR 'lib' attribute must be accompanied with version also";
|
errMsg = "ERROR 'lib' attribute must be accompanied with version also";
|
||||||
unrecoverable = true;
|
unrecoverable = true;
|
||||||
_handler = this;
|
_handler = this;
|
||||||
log.error(errMsg);
|
log.error(errMsg);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
version = String.valueOf(_pluginInfo.attributes.get("version"));
|
||||||
classLoader = new MemClassLoader(this);
|
classLoader = new MemClassLoader(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -30,6 +30,7 @@ import org.junit.After;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
|
import java.io.FileOutputStream;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.nio.ByteBuffer;
|
import java.nio.ByteBuffer;
|
||||||
import java.nio.charset.StandardCharsets;
|
import java.nio.charset.StandardCharsets;
|
||||||
|
@ -132,7 +133,7 @@ public class TestDynamicLoading extends AbstractFullDistribZkTestBase {
|
||||||
|
|
||||||
|
|
||||||
payload = "{\n" +
|
payload = "{\n" +
|
||||||
"'update-requesthandler' : { 'name' : '/test1', 'class': 'org.apache.solr.core.BlobStoreTestRequestHandlerV2' , 'lib':'test','version':'2'}\n" +
|
"'update-requesthandler' : { 'name' : '/test1', 'class': 'org.apache.solr.core.BlobStoreTestRequestHandlerV2' , 'lib':'test','version':2}\n" +
|
||||||
"}";
|
"}";
|
||||||
|
|
||||||
client = restTestHarnesses.get(random().nextInt(restTestHarnesses.size()));
|
client = restTestHarnesses.get(random().nextInt(restTestHarnesses.size()));
|
||||||
|
@ -142,7 +143,7 @@ public class TestDynamicLoading extends AbstractFullDistribZkTestBase {
|
||||||
"/config/overlay?wt=json",
|
"/config/overlay?wt=json",
|
||||||
null,
|
null,
|
||||||
Arrays.asList("overlay", "requestHandler", "/test1", "version"),
|
Arrays.asList("overlay", "requestHandler", "/test1", "version"),
|
||||||
"2",10);
|
2l,10);
|
||||||
|
|
||||||
success= false;
|
success= false;
|
||||||
for(int i=0;i<100;i++) {
|
for(int i=0;i<100;i++) {
|
||||||
|
|
|
@ -233,7 +233,7 @@ public class TestSolrConfigHandler extends RestTestBase {
|
||||||
String testServerBaseUrl,
|
String testServerBaseUrl,
|
||||||
String uri,
|
String uri,
|
||||||
CloudSolrClient cloudSolrServer,List<String> jsonPath,
|
CloudSolrClient cloudSolrServer,List<String> jsonPath,
|
||||||
String expected,
|
Object expected,
|
||||||
long maxTimeoutSeconds ) throws Exception {
|
long maxTimeoutSeconds ) throws Exception {
|
||||||
|
|
||||||
boolean success = false;
|
boolean success = false;
|
||||||
|
|
Loading…
Reference in New Issue