You are viewing a plain text version of this content. The canonical link for it is here.
Posted to test-cvs@httpd.apache.org by st...@apache.org on 2003/11/24 08:57:30 UTC
cvs commit: httpd-test/perl-framework/Apache-Test/lib/Apache TestConfig.pm TestConfigPerl.pm TestServer.pm
stas 2003/11/23 23:57:30
Modified: perl-framework/Apache-Test/lib/Apache TestConfig.pm
TestConfigPerl.pm TestServer.pm
Log:
rename the function select_port, which does different things in different
modules, to be select_first_port and select_next_port
Revision Changes Path
1.185 +4 -4 httpd-test/perl-framework/Apache-Test/lib/Apache/TestConfig.pm
Index: TestConfig.pm
===================================================================
RCS file: /home/cvs/httpd-test/perl-framework/Apache-Test/lib/Apache/TestConfig.pm,v
retrieving revision 1.184
retrieving revision 1.185
diff -u -u -r1.184 -r1.185
--- TestConfig.pm 7 Nov 2003 19:39:47 -0000 1.184
+++ TestConfig.pm 24 Nov 2003 07:57:30 -0000 1.185
@@ -233,7 +233,7 @@
$vars->{scheme} ||= 'http';
$vars->{servername} ||= $self->default_servername;
- $vars->{port} = $self->select_port;
+ $vars->{port} = $self->select_first_port;
$vars->{remote_addr} ||= $self->our_remote_addr;
$vars->{user} ||= $self->default_user;
@@ -539,7 +539,7 @@
}
# memoize the selected value (so we make sure that the same port is used
-# via select). The problem is that select_port() is called 3 times after
+# via select). The problem is that select_first_port() is called 3 times after
# -clean, and it's possible that a lower port will get released
# between calls, leading to various places in the test suite getting a
# different base port selection.
@@ -549,7 +549,7 @@
# bind() will actually get the port. So there is a need in another
# check and reconfiguration just before the server starts.
#
-sub select_port {
+sub select_first_port {
my $self = shift;
my $port ||= $ENV{APACHE_PORT} || $self->{vars}{port} || DEFAULT_PORT;
@@ -601,7 +601,7 @@
unless ($module) {
my $vars = $self->{vars};
- return $self->select_port() unless $vars->{scheme} eq 'https';
+ return $self->select_first_port() unless $vars->{scheme} eq 'https';
$module = $vars->{ssl_module_name};
}
return $self->{vhosts}->{$module}->{port};
1.81 +1 -1 httpd-test/perl-framework/Apache-Test/lib/Apache/TestConfigPerl.pm
Index: TestConfigPerl.pm
===================================================================
RCS file: /home/cvs/httpd-test/perl-framework/Apache-Test/lib/Apache/TestConfigPerl.pm,v
retrieving revision 1.80
retrieving revision 1.81
diff -u -u -r1.80 -r1.81
--- TestConfigPerl.pm 22 Oct 2003 19:03:55 -0000 1.80
+++ TestConfigPerl.pm 24 Nov 2003 07:57:30 -0000 1.81
@@ -240,7 +240,7 @@
my($port, $servername, $vhost);
unless ($namebased and exists $self->{vhosts}->{$module}) {
- $port = $self->server->select_port;
+ $port = $self->server->select_next_port;
$vhost = $self->{vhosts}->{$module} = {};
$vhost->{port} = $port;
1.71 +1 -1 httpd-test/perl-framework/Apache-Test/lib/Apache/TestServer.pm
Index: TestServer.pm
===================================================================
RCS file: /home/cvs/httpd-test/perl-framework/Apache-Test/lib/Apache/TestServer.pm,v
retrieving revision 1.70
retrieving revision 1.71
diff -u -u -r1.70 -r1.71
--- TestServer.pm 7 Nov 2003 19:39:47 -0000 1.70
+++ TestServer.pm 24 Nov 2003 07:57:30 -0000 1.71
@@ -265,7 +265,7 @@
$pid;
}
-sub select_port {
+sub select_next_port {
my $self = shift;
my $max_tries = 100; #XXX