summaryrefslogtreecommitdiff
path: root/same/src/test/java
diff options
context:
space:
mode:
Diffstat (limited to 'same/src/test/java')
-rw-r--r--same/src/test/java/com/orbekk/paxos/MasterProposerTest.java4
-rw-r--r--same/src/test/java/com/orbekk/paxos/PaxosServiceFunctionalTest.java6
2 files changed, 5 insertions, 5 deletions
diff --git a/same/src/test/java/com/orbekk/paxos/MasterProposerTest.java b/same/src/test/java/com/orbekk/paxos/MasterProposerTest.java
index dfc0b19..601a357 100644
--- a/same/src/test/java/com/orbekk/paxos/MasterProposerTest.java
+++ b/same/src/test/java/com/orbekk/paxos/MasterProposerTest.java
@@ -42,8 +42,8 @@ public class MasterProposerTest {
@Test public void unsucessfulProposal() {
connections.paxosMap.put("p1", p1);
- when(p1.propose("client1", 1)).thenReturn(1);
- when(p1.acceptRequest("client1", 1)).thenReturn(1);
+ when(p1.propose("client1", 1)).thenReturn(-1);
+ when(p1.acceptRequest("client1", 1)).thenReturn(-1);
MasterProposer c1 = new MasterProposer(
"client1",
diff --git a/same/src/test/java/com/orbekk/paxos/PaxosServiceFunctionalTest.java b/same/src/test/java/com/orbekk/paxos/PaxosServiceFunctionalTest.java
index 45d6624..4fe3e27 100644
--- a/same/src/test/java/com/orbekk/paxos/PaxosServiceFunctionalTest.java
+++ b/same/src/test/java/com/orbekk/paxos/PaxosServiceFunctionalTest.java
@@ -25,7 +25,7 @@ public class PaxosServiceFunctionalTest {
public void setUp() throws Exception {
server = TestServer.create(handler);
myUrl = "http://localhost:" + server.port;
- setupPaxos(5);
+ setupPaxos(10);
}
public void setupPaxos(int instances) {
@@ -56,7 +56,7 @@ public class PaxosServiceFunctionalTest {
MasterProposer client =
new MasterProposer("http:/client" + j, paxosUrls,
connections);
- if (client.propose(1)) {
+ if (client.proposeRetry(1)) {
incrementSuccessfulProposals();
}
}
@@ -72,7 +72,7 @@ public class PaxosServiceFunctionalTest {
// Ignore.
}
}
- assertEquals(1, successfulProposals);
+ assertEquals(5, successfulProposals);
}
public synchronized void incrementSuccessfulProposals() {