w2p-63043 Minor tweeks to testing enviorment and edge case correction

This commit is contained in:
Andrew Wood
2019-09-05 11:05:38 -04:00
parent c4626c1a49
commit 591df53e7a
3 changed files with 10 additions and 4 deletions

4
.gitignore vendored
View File

@@ -41,6 +41,4 @@ nb-configuration.xml
.DS_Store .DS_Store
##Ignore JRebel project configuration ##Ignore JRebel project configuration
rebel.xml rebel.xml
test.csv

View File

@@ -776,7 +776,6 @@
<groupId>org.hibernate.javax.persistence</groupId> <groupId>org.hibernate.javax.persistence</groupId>
<artifactId>hibernate-jpa-2.1-api</artifactId> <artifactId>hibernate-jpa-2.1-api</artifactId>
<version>1.0.0.Final</version> <version>1.0.0.Final</version>
<scope>compile</scope>
</dependency> </dependency>
</dependencies> </dependencies>

View File

@@ -33,6 +33,7 @@ import org.dspace.content.service.ItemService;
import org.dspace.content.service.MetadataFieldService; import org.dspace.content.service.MetadataFieldService;
import org.dspace.content.service.MetadataValueService; import org.dspace.content.service.MetadataValueService;
import org.dspace.content.service.RelationshipService; import org.dspace.content.service.RelationshipService;
import org.junit.After;
import org.junit.Before; import org.junit.Before;
import org.junit.Test; import org.junit.Test;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
@@ -64,6 +65,14 @@ public class CSVMetadataImportReferenceTest extends AbstractEntityIntegrationTes
col1 = CollectionBuilder.createCollection(context, parentCommunity).withName("Collection 1").build(); col1 = CollectionBuilder.createCollection(context, parentCommunity).withName("Collection 1").build();
} }
/**
* Close testing enviorment and restore auth system
*/
@After
public void close() {
context.restoreAuthSystemState();
}
/** /**
* Helper method to validate relationships * Helper method to validate relationships
* @param leftItem the left item in a known relationship * @param leftItem the left item in a known relationship