~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/lib/sys_mgmt/port_management.py

  • Committer: patrick crews
  • Date: 2011-02-23 17:17:25 UTC
  • mto: (2195.1.1 build)
  • mto: This revision was merged to the branch mainline in revision 2196.
  • Revision ID: gleebix@gmail.com-20110223171725-4tgewemxhsw1m7q8
Integrated randgen with dbqp.  We now have mode=randgen and a set of randgen test suites (very basic now).  Output = same as dtr : )  We also have mode=cleanup to kill any servers we have started.  Docs updates too.  Gendata utility allows us to populate test servers 

Show diffs side-by-side

added added

removed removed

Lines of Context:
77
77
            This is a bit bobo, but will work for now...
78
78
 
79
79
        """
80
 
        
81
80
        searching_for_port = 1
82
 
        attempts_remain = 100
 
81
        attempt_count = 100
 
82
        attempts_remain = attempt_count
83
83
        max_port_value = 32767
84
84
        min_port_value = 5001
85
85
        while searching_for_port and attempts_remain:
93
93
                if desired_port >= max_port_value:
94
94
                    desired_port = min_port_value
95
95
                attempts_remain = attempts_remain - 1
96
 
        self.logging.error("Failed to assign a port in %d attempts")
 
96
        self.logging.error("Failed to assign a port in %d attempts" %attempt_count)
97
97
        sys.exit(1)
98
98
 
99
99
    def check_port_status(self, port):