making the ThreadLocal objectcs instance variables in the Replicables helps the tests that failed due to a lack of isolation between the many Replicable objects in the same VM

This commit is contained in:
Axel Uhl committed 2014-12-11 10:06:36 +01:00
1 parent 64451c2702
commit 163e7ca0f6
2 files changed
+4 -4

No files matched your search

@@ -361,7 +361,7 @@ public class RacingEventServiceImpl implements RacingEventService, ClearStateTes
private Set<OperationWithResultWithIdWrapper<?, ?>> operationsSentToMasterForReplication;
private static ThreadLocal<Boolean> currentlyFillingFromInitialLoadOrApplyingOperationReceivedFromMaster = ThreadLocal.withInitial(() -> false);
private ThreadLocal<Boolean> currentlyFillingFromInitialLoadOrApplyingOperationReceivedFromMaster = ThreadLocal.withInitial(() -> false);
/**
* Constructs a {@link DomainFactory base domain factory} that uses this object's {@link #competitorStore competitor
@@ -526,7 +526,7 @@ public class RacingEventServiceImpl implements RacingEventService, ClearStateTes
@Override
public void setCurrentlyFillingFromInitialLoadOrApplyingOperationReceivedFromMaster(boolean currentlyFillingFromInitialLoadOrApplyingOperationReceivedFromMaster) {
RacingEventServiceImpl.currentlyFillingFromInitialLoadOrApplyingOperationReceivedFromMaster.set(currentlyFillingFromInitialLoadOrApplyingOperationReceivedFromMaster);
this.currentlyFillingFromInitialLoadOrApplyingOperationReceivedFromMaster.set(currentlyFillingFromInitialLoadOrApplyingOperationReceivedFromMaster);
}
@Override
@@ -122,7 +122,7 @@ public class SecurityServiceImpl extends RemoteServiceServlet implements Replica
private Set<OperationWithResultWithIdWrapper<?, ?>> operationsSentToMasterForReplication;
private static ThreadLocal<Boolean> currentlyFillingFromInitialLoadOrApplyingOperationReceivedFromMaster = ThreadLocal.withInitial(() -> false);
private ThreadLocal<Boolean> currentlyFillingFromInitialLoadOrApplyingOperationReceivedFromMaster = ThreadLocal.withInitial(() -> false);
private static Ini shiroConfiguration;
static {
@@ -170,7 +170,7 @@ public class SecurityServiceImpl extends RemoteServiceServlet implements Replica
@Override
public void setCurrentlyFillingFromInitialLoadOrApplyingOperationReceivedFromMaster(boolean currentlyFillingFromInitialLoadOrApplyingOperationReceivedFromMaster) {
SecurityServiceImpl.currentlyFillingFromInitialLoadOrApplyingOperationReceivedFromMaster.set(currentlyFillingFromInitialLoadOrApplyingOperationReceivedFromMaster);
this.currentlyFillingFromInitialLoadOrApplyingOperationReceivedFromMaster.set(currentlyFillingFromInitialLoadOrApplyingOperationReceivedFromMaster);
}
/**