Tests passing
This commit is contained in:
parent
826ba6458a
commit
347ecc7d51
|
@ -41,12 +41,6 @@ public interface IDao {
|
|||
|
||||
FhirContext getContext();
|
||||
|
||||
// FIXME: remove
|
||||
// /**
|
||||
// * Populate all of the runtime dependencies that a bundle provider requires in order to work
|
||||
// */
|
||||
// void injectDependenciesIntoBundleProvider(PersistedJpaBundleProvider theProvider);
|
||||
|
||||
IBaseResource toResource(BaseHasResource theEntity, boolean theForHistoryOperation);
|
||||
|
||||
<R extends IBaseResource> R toResource(Class<R> theResourceType, IBaseResourceEntity theEntity, Collection<ResourceTag> theTagList, boolean theForHistoryOperation);
|
||||
|
|
|
@ -24,10 +24,10 @@ import ca.uhn.fhir.context.FhirContext;
|
|||
import ca.uhn.fhir.interceptor.api.HookParams;
|
||||
import ca.uhn.fhir.interceptor.api.IInterceptorBroadcaster;
|
||||
import ca.uhn.fhir.interceptor.api.Pointcut;
|
||||
import ca.uhn.fhir.jpa.api.config.DaoConfig;
|
||||
import ca.uhn.fhir.jpa.api.dao.DaoRegistry;
|
||||
import ca.uhn.fhir.jpa.api.dao.IDao;
|
||||
import ca.uhn.fhir.jpa.api.dao.IFhirResourceDao;
|
||||
import ca.uhn.fhir.jpa.api.config.DaoConfig;
|
||||
import ca.uhn.fhir.jpa.api.svc.ISearchCoordinatorSvc;
|
||||
import ca.uhn.fhir.jpa.dao.IResultIterator;
|
||||
import ca.uhn.fhir.jpa.dao.ISearchBuilder;
|
||||
|
@ -295,16 +295,6 @@ public class SearchCoordinatorSvcImpl implements ISearchCoordinatorSvc {
|
|||
return new ResourceGoneException(msg);
|
||||
}
|
||||
|
||||
// FIXME: remove?
|
||||
// private void populateBundleProvider(PersistedJpaBundleProvider theRetVal) {
|
||||
// theRetVal.setContext(myContext);
|
||||
// theRetVal.setEntityManager(myEntityManager);
|
||||
// theRetVal.setPlatformTransactionManager(myManagedTxManager);
|
||||
// theRetVal.setSearchCacheSvc(mySearchCacheSvc);
|
||||
// theRetVal.setSearchCoordinatorSvc(this);
|
||||
// theRetVal.setInterceptorBroadcaster(myInterceptorBroadcaster);
|
||||
// }
|
||||
|
||||
@Override
|
||||
public IBundleProvider registerSearch(final IFhirResourceDao theCallingDao, final SearchParameterMap theParams, String theResourceType, CacheControlDirective theCacheControlDirective, RequestDetails theRequestDetails) {
|
||||
final String searchUuid = UUID.randomUUID().toString();
|
||||
|
|
|
@ -2,15 +2,15 @@ package ca.uhn.fhir.jpa.provider.r4;
|
|||
|
||||
import ca.uhn.fhir.context.support.IValidationSupport;
|
||||
import ca.uhn.fhir.jpa.api.dao.DaoRegistry;
|
||||
import ca.uhn.fhir.jpa.subscription.match.config.WebsocketDispatcherConfig;
|
||||
import ca.uhn.fhir.jpa.api.svc.ISearchCoordinatorSvc;
|
||||
import ca.uhn.fhir.jpa.dao.r4.BaseJpaR4Test;
|
||||
import ca.uhn.fhir.jpa.provider.GraphQLProvider;
|
||||
import ca.uhn.fhir.jpa.provider.TerminologyUploaderProvider;
|
||||
import ca.uhn.fhir.jpa.search.DatabaseBackedPagingProvider;
|
||||
import ca.uhn.fhir.jpa.api.svc.ISearchCoordinatorSvc;
|
||||
import ca.uhn.fhir.jpa.searchparam.registry.SearchParamRegistryImpl;
|
||||
import ca.uhn.fhir.jpa.subscription.submit.interceptor.SubscriptionMatcherInterceptor;
|
||||
import ca.uhn.fhir.jpa.subscription.match.config.WebsocketDispatcherConfig;
|
||||
import ca.uhn.fhir.jpa.subscription.match.registry.SubscriptionLoader;
|
||||
import ca.uhn.fhir.jpa.subscription.submit.interceptor.SubscriptionMatcherInterceptor;
|
||||
import ca.uhn.fhir.jpa.util.ResourceCountCache;
|
||||
import ca.uhn.fhir.narrative.DefaultThymeleafNarrativeGenerator;
|
||||
import ca.uhn.fhir.parser.StrictErrorHandler;
|
||||
|
@ -51,7 +51,6 @@ import java.util.List;
|
|||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import static org.apache.commons.lang3.StringUtils.isNotBlank;
|
||||
import static org.junit.Assert.fail;
|
||||
|
||||
public abstract class BaseResourceProviderR4Test extends BaseJpaR4Test {
|
||||
|
||||
|
@ -202,19 +201,6 @@ public abstract class BaseResourceProviderR4Test extends BaseJpaR4Test {
|
|||
}
|
||||
|
||||
protected void waitForActivatedSubscriptionCount(int theSize) throws Exception {
|
||||
// FIXME: remove?
|
||||
// for (int i = 0; ; i++) {
|
||||
// if (i == 10) {
|
||||
// fail("Failed to init subscriptions");
|
||||
// }
|
||||
// try {
|
||||
// mySubscriptionLoader.doSyncSubscriptionsForUnitTest();
|
||||
// break;
|
||||
// } catch (ResourceVersionConflictException e) {
|
||||
// Thread.sleep(250);
|
||||
// }
|
||||
// }
|
||||
|
||||
TestUtil.waitForSize(theSize, () -> mySubscriptionRegistry.size());
|
||||
Thread.sleep(500);
|
||||
}
|
||||
|
|
|
@ -83,7 +83,7 @@ public class SubscriptionActivatingSubscriber extends BaseSubscriberForSubscript
|
|||
switch (payload.getOperationType()) {
|
||||
case CREATE:
|
||||
case UPDATE:
|
||||
activateAndRegisterSubscriptionIfRequiredInTransaction(payload.getNewPayload(myFhirContext));
|
||||
activateOrRegisterSubscriptionIfRequired(payload.getNewPayload(myFhirContext));
|
||||
break;
|
||||
case DELETE:
|
||||
case MANUALLY_TRIGGERED:
|
||||
|
@ -107,12 +107,6 @@ public class SubscriptionActivatingSubscriber extends BaseSubscriberForSubscript
|
|||
|
||||
if (SubscriptionConstants.REQUESTED_STATUS.equals(statusString)) {
|
||||
return activateSubscription(theSubscription);
|
||||
// FIXME: remove
|
||||
// } else if (SubscriptionConstants.ACTIVE_STATUS.equals(statusString)) {
|
||||
// return mySubscriptionRegistry.registerSubscriptionUnlessAlreadyRegistered(theSubscription);
|
||||
// } else {
|
||||
// Status isn't "active" or "requested"
|
||||
// return mySubscriptionRegistry.unregisterSubscriptionIfRegistered(theSubscription, statusString);
|
||||
}
|
||||
|
||||
return false;
|
||||
|
@ -138,8 +132,4 @@ public class SubscriptionActivatingSubscriber extends BaseSubscriberForSubscript
|
|||
}
|
||||
}
|
||||
|
||||
private void activateAndRegisterSubscriptionIfRequiredInTransaction(IBaseResource theSubscription) {
|
||||
activateOrRegisterSubscriptionIfRequired(theSubscription);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue