Пример #1
0
    def test_eight_connections(self):
        """  Test Name: test_eight_connections\n\
        Number Connections: 8 \n\
        Procedure: Run 8 connections simultaneously for simple GET requests:\n\
            GET /loadavg HTTP/1.1
        """
        
        
        #Append eight connections to the list
        for x in range(8):
            self.http_connections.append(httplib.HTTPConnection(self.hostname,
                                                                self.port))

        #Connect each connection
        for http_conn in reversed(self.http_connections):
            http_conn.connect()
        
        #Run a request for /loadavg and check it
        for http_conn in reversed(self.http_connections):
            server_check.run_connection_check_loadavg(http_conn, self.hostname)
        
        #Re-connect in the case of HTTP/1.0 protocol implementation
        for http_conn in self.http_connections:
            http_conn.connect()
        
        #Run a request for /loadavg and check it
        for http_conn in self.http_connections:
            server_check.run_connection_check_loadavg(http_conn, self.hostname)
Пример #2
0
    def test_eight_connections(self):
        """  Test Name: test_eight_connections\n\
        Number Connections: 8 \n\
        Procedure: Run 8 connections simultaneously for simple GET requests:\n\
            GET /loadavg HTTP/1.1
        """

        #Append eight connections to the list
        for x in range(8):
            self.http_connections.append(
                httplib.HTTPConnection(self.hostname, self.port))

        #Connect each connection
        for http_conn in reversed(self.http_connections):
            http_conn.connect()

        #Run a request for /loadavg and check it
        for http_conn in reversed(self.http_connections):
            server_check.run_connection_check_loadavg(http_conn, self.hostname)

        #Re-connect in the case of HTTP/1.0 protocol implementation
        for http_conn in self.http_connections:
            http_conn.connect()

        #Run a request for /loadavg and check it
        for http_conn in self.http_connections:
            server_check.run_connection_check_loadavg(http_conn, self.hostname)