From 8c0633f4d9055c6710b170e40bb006ed8fc3a0c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kjetil=20=C3=98rbekk?= Date: Tue, 24 Apr 2012 13:38:20 +0200 Subject: Fix master takeover code. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit – Use the new services to send a MasterTakeover(). – Remove some old broadcast code. – Remove MasterProposerTest because this functionality is well enough covered by the functional test. – Remove HTTP services from PaxosServiceFunctionalTest. – Fix master takeover test. --- .../com/orbekk/paxos/PaxosServiceFunctionalTest.java | 16 ---------------- 1 file changed, 16 deletions(-) (limited to 'same/src/test/java/com/orbekk/paxos/PaxosServiceFunctionalTest.java') diff --git a/same/src/test/java/com/orbekk/paxos/PaxosServiceFunctionalTest.java b/same/src/test/java/com/orbekk/paxos/PaxosServiceFunctionalTest.java index 6ceb423..98631b0 100644 --- a/same/src/test/java/com/orbekk/paxos/PaxosServiceFunctionalTest.java +++ b/same/src/test/java/com/orbekk/paxos/PaxosServiceFunctionalTest.java @@ -13,13 +13,9 @@ import org.junit.After; import org.junit.Before; import org.junit.Test; -import com.googlecode.jsonrpc4j.JsonRpcServer; import com.orbekk.protobuf.SimpleProtobufServer; import com.orbekk.same.ConnectionManagerImpl; import com.orbekk.same.Services.ClientState; -import com.orbekk.same.http.JettyServerBuilder; -import com.orbekk.same.http.JettyServerContainer; -import com.orbekk.same.http.RpcServlet; public class PaxosServiceFunctionalTest { ConnectionManagerImpl connections = new ConnectionManagerImpl(500, 500); @@ -65,18 +61,6 @@ public class PaxosServiceFunctionalTest { paxosUrls.add(location); } - public List setupPaxos(JettyServerBuilder builder, int instances) { - List tempUrls = new ArrayList(); - for (int i = 1; i <= instances; i++) { - JsonRpcServer jsonServer = new JsonRpcServer( - new PaxosServiceImpl("P" + i + ": "), PaxosService.class); - String serviceId = "/PaxosService" + i + ".json"; - builder.withServlet(new RpcServlet(jsonServer), serviceId); - tempUrls.add(serviceId); - } - return tempUrls; - } - public void addUrls(List services) { for (String url : services) { paxosUrls.add(myUrl + url); -- cgit v1.2.3