SOLR-6801 addressing test failures

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1647034 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Noble Paul 2014-12-20 18:43:53 +00:00
parent 1f431a14f6
commit a9f6aaaee1
3 changed files with 5 additions and 3 deletions

View File

@ -532,6 +532,7 @@ public final class RequestHandlers {
try {
if(jarContent == null) checkJarAvailable();
buf = jarContent.jar.getFileContent(path);
if(buf==null) throw new ClassNotFoundException("class not found in loaded jar"+ name ) ;
} catch (IOException e1) {
throw new ClassNotFoundException("class not found "+ name ,e1) ;

View File

@ -28,6 +28,6 @@ public class BlobStoreTestRequestHandler extends DumpRequestHandler{
@Override
public void handleRequestBody(SolrQueryRequest req, SolrQueryResponse rsp) throws IOException {
super.handleRequestBody(req, rsp);
rsp.add("classloader", this.getClass().getClassLoader().getClass().getName());
rsp.add("class", BlobStoreTestRequestHandler.class.getName());
}
}

View File

@ -20,6 +20,7 @@ package org.apache.solr.core;
import java.io.IOException;
import java.nio.ByteBuffer;
import java.nio.charset.StandardCharsets;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
@ -30,6 +31,7 @@ import java.util.zip.ZipOutputStream;
import org.apache.solr.client.solrj.SolrServer;
import org.apache.solr.client.solrj.impl.HttpSolrServer;
import org.apache.solr.cloud.AbstractFullDistribZkTestBase;
import org.apache.solr.common.cloud.ZkStateReader;
import org.apache.solr.handler.TestBlobHandler;
import org.apache.solr.util.RESTfulServerProvider;
import org.apache.solr.util.RestTestHarness;
@ -96,8 +98,7 @@ public class TestDynamicLoading extends AbstractFullDistribZkTestBase {
// Thread.sleep(100);
map = TestSolrConfigHandler.getRespMap("/test1?wt=json", client);
assertEquals(RequestHandlers.MemClassLoader.class.getName(), map.get("classloader"));
assertEquals(new String( ZkStateReader.toJSON(map) , StandardCharsets.UTF_8), BlobStoreTestRequestHandler.class.getName(), map.get("class"));
}