Example #1
0
def testMasterServerList(IP, port):
    message = 'GETSERVERINFO'
    response = network.sendAndGetResponseFromIP(IP, port, message)
    servers = server.netStringToServerList(response)
    assert len(servers) == 4
    assert servers[0].role == "master"
    print "Master Server List Test Passed"
Example #2
0
def testMasterServerList(IP, port):
    message = 'GETSERVERINFO'
    response = network.sendAndGetResponseFromIP(IP, port, message)
    servers = server.netStringToServerList(response)
    assert len(servers) == 4
    assert servers[0].role == "master"
    print "Master Server List Test Passed"
Example #3
0
 def saveServerInfo(self, netString):
     self.servers = server.netStringToServerList(netString)
     self.aliveSlaves = filter(lambda s : s.role=='slave' and s.alive, self.servers)
     self.m = len(self.aliveSlaves)
     log.info("Server informations saved")
Example #4
0
 def saveServerInfo(self, netString):
     self.servers = server.netStringToServerList(netString)
     self.aliveSlaves = filter(lambda s: s.role == 'slave' and s.alive,
                               self.servers)
     self.m = len(self.aliveSlaves)
     log.info("Server informations saved")