mirror of
https://github.com/Alfresco/SearchServices.git
synced 2026-09-16 18:12:56 +00:00
SEARCH-2: Update SolrAPIQueueClient to support fingerprint tests
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/DEV/5.2.N/root@130920 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
+8
@@ -54,6 +54,8 @@ public class SOLRAPIQueueClient extends SOLRAPIClient
|
||||
public static List<Transaction> transactionQueue = Collections.synchronizedList(new ArrayList());
|
||||
public static Map<Long, List<Node>> nodeMap = Collections.synchronizedMap(new HashMap());
|
||||
public static Map<Long, NodeMetaData> nodeMetaDataMap = Collections.synchronizedMap(new HashMap());
|
||||
public static Map<Long, String> nodeContentMap = Collections.synchronizedMap(new HashMap());
|
||||
|
||||
private static boolean throwException;
|
||||
|
||||
public SOLRAPIQueueClient(NamespaceDAO namespaceDAO)
|
||||
@@ -310,7 +312,13 @@ public class SOLRAPIQueueClient extends SOLRAPIClient
|
||||
if(throwException) {
|
||||
throw new ConnectException("THROWING EXCEPTION, better be ready!");
|
||||
}
|
||||
|
||||
//Just put the nodeId innto the content so we query for this in tests.
|
||||
|
||||
if(nodeContentMap.containsKey(nodeId)) {
|
||||
return new GetTextContentResponse(new DummyResponse(nodeContentMap.get(nodeId)));
|
||||
}
|
||||
|
||||
return new GetTextContentResponse(new DummyResponse("Hello world "+nodeId));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user