Exemple #1
0
 public void LoadBalancer_Server_Assignment()
 {
     LoadBalancer.InitialiseServer("testServer0");
     LoadBalancer.InitialiseServer("testServer1");
     LoadBalancer.InitialiseServer("testServer2");
     LoadBalancer.UpdateServers("testServer0", 10);
     LoadBalancer.UpdateServers("testServer1", 5);
     Assert.AreEqual("testServer0:50051", LoadBalancer.AssignServer()); // testServer0 will have -10 users and as such has the fewest users
 }