mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-07 01:54:22 +00:00
91354: Fix test_forceReindexAfterNewVersionInWorkspace
Re-enable commit d549e6e58a
This commit is contained in:
@@ -193,10 +193,9 @@ public class ItemIndexFactoryImpl extends DSpaceObjectIndexFactoryImpl<Indexable
|
||||
Version latestVersion = versionHistoryService.getLatestVersion(context, history);
|
||||
|
||||
// find the latest version of the given item that is archived
|
||||
// TODO temp disabled
|
||||
//while (latestVersion != null && !latestVersion.getItem().isArchived()) {
|
||||
// latestVersion = versionHistoryService.getPrevious(context, history, latestVersion);
|
||||
//}
|
||||
while (latestVersion != null && !latestVersion.getItem().isArchived()) {
|
||||
latestVersion = versionHistoryService.getPrevious(context, history, latestVersion);
|
||||
}
|
||||
|
||||
// could not find an archived version of the given item
|
||||
if (latestVersion == null) {
|
||||
@@ -206,8 +205,7 @@ public class ItemIndexFactoryImpl extends DSpaceObjectIndexFactoryImpl<Indexable
|
||||
}
|
||||
|
||||
// sanity check
|
||||
// TODO temp disabled
|
||||
//assert latestVersion.getItem().isArchived();
|
||||
assert latestVersion.getItem().isArchived();
|
||||
|
||||
return item.equals(latestVersion.getItem());
|
||||
}
|
||||
|
@@ -2025,7 +2025,7 @@ public class DiscoveryVersioningIT extends AbstractControllerIntegrationTest {
|
||||
assertEquals(0, mdvs8.get(0).getPlace());
|
||||
verifySolrField(pro1_1, "relation.isPublicationOfProject", List.of(pub1_2.getID().toString()));
|
||||
verifySolrField(pro1_1, "archived", List.of("true"));
|
||||
verifySolrField(pro1_1, "latestVersion", List.of(true));// TODO expect failure here
|
||||
verifySolrField(pro1_1, "latestVersion", List.of(true));
|
||||
|
||||
// after create pro 1.2 - test relation.*.latestForDiscovery metadata of project 1.1
|
||||
List<MetadataValue> mdvs8a = itemService
|
||||
|
Reference in New Issue
Block a user