Ks 20240904 intermittents (#6264)

This commit is contained in:
Ken Stevens 2024-09-06 10:49:19 -04:00 committed by GitHub
parent 070f24ad01
commit b4607c3628
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 9 additions and 2 deletions

View File

@ -34,6 +34,7 @@ public class PartitionSettings {
private boolean myAlwaysOpenNewTransactionForDifferentPartition;
private boolean myConditionalCreateDuplicateIdentifiersEnabled = false;
public PartitionSettings() {}
/**
* Should we always open a new database transaction if the partition context changes
*

View File

@ -40,6 +40,7 @@ public class HashMapResourceProviderExtension<T extends IBaseResource> extends H
private final RestfulServerExtension myRestfulServerExtension;
private boolean myClearBetweenTests = true;
private boolean myInitialized = false;
private final List<T> myUpdates = new ArrayList<>();
/**
@ -55,8 +56,10 @@ public class HashMapResourceProviderExtension<T extends IBaseResource> extends H
@Override
public void afterEach(ExtensionContext context) throws Exception {
if (myClearBetweenTests) {
myRestfulServerExtension.getRestfulServer().unregisterProvider(HashMapResourceProviderExtension.this);
}
}
@Override
@Search(allowUnknownParams = true)
@ -77,8 +80,11 @@ public class HashMapResourceProviderExtension<T extends IBaseResource> extends H
if (myClearBetweenTests) {
clear();
clearCounts();
}
myRestfulServerExtension.getRestfulServer().registerProvider(HashMapResourceProviderExtension.this);
} else if (!myInitialized) {
myInitialized = true;
myRestfulServerExtension.getRestfulServer().registerProvider(HashMapResourceProviderExtension.this);
}
}
@Override