Revision 8773
Added by ben leinfelder over 10 years ago
metacat-index/src/test/java/edu/ucsb/nceas/metacat/index/SolrIndexIT.java | ||
---|---|---|
100 | 100 |
obsoletes.add("tao");*/ |
101 | 101 |
Identifier pid = new Identifier(); |
102 | 102 |
pid.setValue(newId); |
103 |
solrIndex.update(pid, systemMetadata, EMLFILEPATH); |
|
103 |
solrIndex.update(pid, systemMetadata, EMLUPDATEFILEPATH);
|
|
104 | 104 |
String result = doQuery(solrIndex.getSolrServer()); |
105 | 105 |
assertTrue(result.contains("version1")); |
106 | 106 |
assertTrue(result.contains("version2")); |
... | ... | |
191 | 191 |
SystemMetadata systemMetadata = TypeMarshaller.unmarshalTypeFromFile(SystemMetadata.class, SYSTEMMETAFILEPATH); |
192 | 192 |
Identifier pid = new Identifier(); |
193 | 193 |
pid.setValue(id); |
194 |
DistributedMapsFactory.getSystemMetadataMap().put(pid, systemMetadata); |
|
194 | 195 |
solrIndex.update(pid, systemMetadata, EMLFILEPATH); |
195 | 196 |
String result = doQuery(solrIndex.getSolrServer()); |
196 | 197 |
List<String> ids = solrIndex.getSolrIds(); |
... | ... | |
207 | 208 |
SystemMetadata annotationSystemMetadata = TypeMarshaller.unmarshalTypeFromFile(SystemMetadata.class, ANNOTATION_SYSTEM_META_FILE_PATH); |
208 | 209 |
Identifier annotationPid = new Identifier(); |
209 | 210 |
annotationPid.setValue(annotation_id); |
211 |
DistributedMapsFactory.getSystemMetadataMap().put(annotationPid, annotationSystemMetadata); |
|
210 | 212 |
solrIndex.update(annotationPid, annotationSystemMetadata, OA_FILE_PATH); |
211 | 213 |
String annotationResult = doQuery(solrIndex.getSolrServer(), "&fq=standard_sm:\"http://ecoinformatics.org/oboe/oboe.1.0/oboe-standards.owl#Gram\""); |
212 | 214 |
assertTrue(annotationResult.contains(pid.getValue())); |
Also available in: Unified diff
test for update using the updated EML file, not the original. Also add the SM to the shared map so that the indexing process can consult SM.accessPolicy when indexing annotations that assert things about those test documents.