Make sure record history state as closed once we are done with
it.
Change-Id: Icbdf947ad166b082e06df896741e618e801ecf2e
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
if (local != State.CLOSED) {
Preconditions.checkState(local == State.IDLE, "Local history %s has an open transaction", this);
histories.values().forEach(ProxyHistory::close);
if (local != State.CLOSED) {
Preconditions.checkState(local == State.IDLE, "Local history %s has an open transaction", this);
histories.values().forEach(ProxyHistory::close);
+ updateState(local, State.CLOSED);
@Test
public void testCreateChainedTransactionAfterClose() throws Exception {
@Test
public void testCreateChainedTransactionAfterClose() throws Exception {
- //TODO remove when test passes also for ClientBackedDataStore
- Assume.assumeTrue(testParameter.equals(DistributedDataStore.class));
-
new IntegrationTestKit(getSystem(), datastoreContextBuilder) {
{
try (AbstractDataStore dataStore = setupAbstractDataStore(
new IntegrationTestKit(getSystem(), datastoreContextBuilder) {
{
try (AbstractDataStore dataStore = setupAbstractDataStore(
@Test
public void testChainWithReadOnlyTxAfterPreviousReady() throws Exception {
@Test
public void testChainWithReadOnlyTxAfterPreviousReady() throws Exception {
- //TODO remove when test passes also for ClientBackedDataStore
- Assume.assumeTrue(testParameter.equals(DistributedDataStore.class));
-
new IntegrationTestKit(getSystem(), datastoreContextBuilder) {
{
try (final AbstractDataStore dataStore = setupAbstractDataStore(
new IntegrationTestKit(getSystem(), datastoreContextBuilder) {
{
try (final AbstractDataStore dataStore = setupAbstractDataStore(
@Test
public void testChangeListenerRegistration() throws Exception {
@Test
public void testChangeListenerRegistration() throws Exception {
- //TODO remove when test passes also for ClientBackedDataStore
- Assume.assumeTrue(testParameter.equals(DistributedDataStore.class));
-
new IntegrationTestKit(getSystem(), datastoreContextBuilder) {
{
try (final AbstractDataStore dataStore = setupAbstractDataStore(
new IntegrationTestKit(getSystem(), datastoreContextBuilder) {
{
try (final AbstractDataStore dataStore = setupAbstractDataStore(