stas 2004/01/27 22:06:55
Modified: ModPerl-Registry/t TEST.PL
Log:
-maxclients and -startup_timeout are now overridable from the command
line (previously user's value was ignored)
Revision Changes Path
1.12 +7 -5 modperl-2.0/ModPerl-Registry/t/TEST.PL
Index: TEST.PL
===================================================================
RCS file: /home/cvs/modperl-2.0/ModPerl-Registry/t/TEST.PL,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -u -r1.11 -r1.12
--- TEST.PL 5 Jan 2004 20:23:47 -0000 1.11
+++ TEST.PL 28 Jan 2004 06:06:55 -0000 1.12
@@ -23,6 +23,11 @@
use Apache::Build;
+# default timeout in secs (threaded mpms are extremely slow to
+# startup, due to a slow perl_clone operation)
+use constant DEFAULT_STARTUP_TIMEOUT =>
+ Apache::Build->build_config->mpm_is_threaded() ? 180 : 90;
+
# subclass new_test_config to add some config vars which will be
# replaced in generated httpd.conf
sub new_test_config {
@@ -34,12 +39,9 @@
my $base = catpath $volume, rootdir(), $dir, $file;
$self->{conf_opts}->{src_dir} = catdir $base, qw(src modules perl);
- $self->{conf_opts}->{maxclients} = MIN_MAXCLIENTS;
+ $self->{conf_opts}->{startup_timeout} ||= DEFAULT_STARTUP_TIMEOUT;
- # timeout in secs (threaded mpms are extremely slow to startup,
- # due to a slow perl_clone operation)
- $self->{conf_opts}->{startup_timeout} =
- Apache::Build->build_config->mpm_is_threaded() ? 180 : 90;
+ $self->{conf_opts}->{maxclients} ||= MIN_MAXCLIENTS;
return $self->SUPER::new_test_config;
}