Skip to content

Commit

Permalink
review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
ywelsch committed Aug 7, 2018
1 parent 3bbb576 commit 711447b
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -760,8 +760,7 @@ public void testVoteCollection() {
}

public void testSafety() {
Cluster cluster = new Cluster(randomIntBetween(1, 5));
cluster.runRandomly(10000);
new Cluster(randomIntBetween(1, 5)).runRandomly();
}

public static CoordinationState createCoordinationState(PersistedState storage, DiscoveryNode localNode) {
Expand Down Expand Up @@ -937,7 +936,8 @@ void applyMessage(Message message) {
}
}

void runRandomly(int iterations) {
void runRandomly() {
final int iterations = 10000;
final long maxTerm = 4;
long nextTerm = 1;
for (int i = 0; i < iterations; i++) {
Expand Down Expand Up @@ -975,7 +975,7 @@ void runRandomly(int iterations) {
}
}

// check system invariants
// check system invariants. It's sufficient to do this at the end as these invariants are monotonic.
invariant();
}

Expand Down

0 comments on commit 711447b

Please sign in to comment.