Remove static from initialRequestApplied

Previously, multiple handlers needed to signal off one global variable.
Now, that this check is inside the singleton P2PDataStorage, make it
non-static and private.
This commit is contained in:
Julian Knutsen 2019-11-21 15:14:19 -08:00
parent a34488b735
commit 3d6e9fbef5
No known key found for this signature in database
GPG key ID: D85F536DB3615B2D
2 changed files with 1 additions and 4 deletions

View file

@ -118,9 +118,7 @@ public class P2PDataStorage implements MessageListener, ConnectionListener, Pers
@VisibleForTesting
public static int CHECK_TTL_INTERVAL_SEC = 60;
// TODO: Remove static
@VisibleForTesting
static boolean initialRequestApplied = false;
private boolean initialRequestApplied = false;
private final Broadcaster broadcaster;
private final AppendOnlyDataStoreService appendOnlyDataStoreService;

View file

@ -52,7 +52,6 @@ public class P2PDataStorageProcessGetDataResponse {
public void setUp() {
MockitoAnnotations.initMocks(this);
this.testState = new TestState();
P2PDataStorage.initialRequestApplied = false;
this.peerNodeAddress = new NodeAddress("peer", 8080);
}