Ks 20240904 intermittents (#6264)
This commit is contained in:
parent
070f24ad01
commit
b4607c3628
|
@ -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
|
||||
*
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue