Test fixes

This commit is contained in:
James Agnew 2018-05-30 21:23:20 -04:00
parent 91d4ab8496
commit bb5d4110a2
4 changed files with 23 additions and 17 deletions

View File

@ -14,7 +14,6 @@ import ca.uhn.fhir.jpa.search.DatabaseBackedPagingProvider;
import ca.uhn.fhir.jpa.search.ISearchCoordinatorSvc; import ca.uhn.fhir.jpa.search.ISearchCoordinatorSvc;
import ca.uhn.fhir.jpa.sp.ISearchParamPresenceSvc; import ca.uhn.fhir.jpa.sp.ISearchParamPresenceSvc;
import ca.uhn.fhir.jpa.util.ResourceCountCache; import ca.uhn.fhir.jpa.util.ResourceCountCache;
import ca.uhn.fhir.jpa.util.SingleItemLoadingCache;
import ca.uhn.fhir.model.dstu2.composite.CodeableConceptDt; import ca.uhn.fhir.model.dstu2.composite.CodeableConceptDt;
import ca.uhn.fhir.model.dstu2.composite.CodingDt; import ca.uhn.fhir.model.dstu2.composite.CodingDt;
import ca.uhn.fhir.model.dstu2.composite.MetaDt; import ca.uhn.fhir.model.dstu2.composite.MetaDt;
@ -42,7 +41,6 @@ import org.springframework.transaction.support.TransactionTemplate;
import javax.persistence.EntityManager; import javax.persistence.EntityManager;
import java.io.IOException; import java.io.IOException;
import java.io.InputStream; import java.io.InputStream;
import java.util.Map;
import static org.junit.Assert.*; import static org.junit.Assert.*;
import static org.mockito.Mockito.mock; import static org.mockito.Mockito.mock;
@ -181,12 +179,13 @@ public abstract class BaseJpaDstu2Test extends BaseJpaTest {
} }
@Before @Before
@Transactional
public void beforeFlushFT() { public void beforeFlushFT() {
FullTextEntityManager ftem = Search.getFullTextEntityManager(myEntityManager); runInTransaction(() -> {
ftem.purgeAll(ResourceTable.class); FullTextEntityManager ftem = Search.getFullTextEntityManager(myEntityManager);
ftem.purgeAll(ResourceIndexedSearchParamString.class); ftem.purgeAll(ResourceTable.class);
ftem.flushToIndexes(); ftem.purgeAll(ResourceIndexedSearchParamString.class);
ftem.flushToIndexes();
});
myDaoConfig.setSchedulingDisabled(true); myDaoConfig.setSchedulingDisabled(true);
myDaoConfig.setIndexMissingFields(DaoConfig.IndexEnabledEnum.ENABLED); myDaoConfig.setIndexMissingFields(DaoConfig.IndexEnabledEnum.ENABLED);

View File

@ -274,12 +274,13 @@ public abstract class BaseJpaDstu3Test extends BaseJpaTest {
} }
@Before @Before
@Transactional
public void beforeFlushFT() { public void beforeFlushFT() {
FullTextEntityManager ftem = Search.getFullTextEntityManager(myEntityManager); runInTransaction(() -> {
ftem.purgeAll(ResourceTable.class); FullTextEntityManager ftem = Search.getFullTextEntityManager(myEntityManager);
ftem.purgeAll(ResourceIndexedSearchParamString.class); ftem.purgeAll(ResourceTable.class);
ftem.flushToIndexes(); ftem.purgeAll(ResourceIndexedSearchParamString.class);
ftem.flushToIndexes();
});
myDaoConfig.setSchedulingDisabled(true); myDaoConfig.setSchedulingDisabled(true);
myDaoConfig.setIndexMissingFields(DaoConfig.IndexEnabledEnum.ENABLED); myDaoConfig.setIndexMissingFields(DaoConfig.IndexEnabledEnum.ENABLED);

View File

@ -282,12 +282,13 @@ public abstract class BaseJpaR4Test extends BaseJpaTest {
} }
@Before @Before
@Transactional
public void beforeFlushFT() { public void beforeFlushFT() {
FullTextEntityManager ftem = Search.getFullTextEntityManager(myEntityManager); runInTransaction(()->{
ftem.purgeAll(ResourceTable.class); FullTextEntityManager ftem = Search.getFullTextEntityManager(myEntityManager);
ftem.purgeAll(ResourceIndexedSearchParamString.class); ftem.purgeAll(ResourceTable.class);
ftem.flushToIndexes(); ftem.purgeAll(ResourceIndexedSearchParamString.class);
ftem.flushToIndexes();
});
myDaoConfig.setSchedulingDisabled(true); myDaoConfig.setSchedulingDisabled(true);
myDaoConfig.setIndexMissingFields(DaoConfig.IndexEnabledEnum.ENABLED); myDaoConfig.setIndexMissingFields(DaoConfig.IndexEnabledEnum.ENABLED);

View File

@ -7,6 +7,11 @@
</properties> </properties>
<body> <body>
<release version="3.5.0" date="TBD"> <release version="3.5.0" date="TBD">
<action type="add">
HAPI FHIR now supports JDK 9 and JDK 10, both for building HAPI FHIR
as well as for use. JDK 8 remains supported and is the minimum requirement
in order to build or use HAPI FHIR.
</action>
<action type="add"> <action type="add">
The version of a few dependencies have been bumped to the The version of a few dependencies have been bumped to the
latest versions (dependent HAPI modules listed in brackets): latest versions (dependent HAPI modules listed in brackets):