Improve updated JUnit test.
This commit is contained in:
parent
4bf649c09c
commit
97e6d967e9
|
@ -6,6 +6,7 @@ import ca.uhn.fhir.jpa.model.entity.BinaryStorageEntity;
|
||||||
import ca.uhn.fhir.rest.server.exceptions.ResourceNotFoundException;
|
import ca.uhn.fhir.rest.server.exceptions.ResourceNotFoundException;
|
||||||
import org.hl7.fhir.r4.model.IdType;
|
import org.hl7.fhir.r4.model.IdType;
|
||||||
import org.junit.After;
|
import org.junit.After;
|
||||||
|
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;
|
||||||
import org.springframework.beans.factory.annotation.Qualifier;
|
import org.springframework.beans.factory.annotation.Qualifier;
|
||||||
|
@ -37,11 +38,18 @@ public class DatabaseBlobBinaryStorageSvcImplTest extends BaseJpaR4Test {
|
||||||
@Autowired
|
@Autowired
|
||||||
private DaoConfig myDaoConfig;
|
private DaoConfig myDaoConfig;
|
||||||
|
|
||||||
@After
|
@Before
|
||||||
public void resetDaoConfig() {
|
public void backupDaoConfig() {
|
||||||
myDaoConfig.setPreloadBlobFromInputStream(false);
|
defaultPreloadBlobFromInputStream = myDaoConfig.isPreloadBlobFromInputStream();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@After
|
||||||
|
public void restoreDaoConfig() {
|
||||||
|
myDaoConfig.setPreloadBlobFromInputStream(defaultPreloadBlobFromInputStream);
|
||||||
|
}
|
||||||
|
|
||||||
|
boolean defaultPreloadBlobFromInputStream;
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testStoreAndRetrieve() throws IOException {
|
public void testStoreAndRetrieve() throws IOException {
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue