X-Git-Url: http://git.indexdata.com/?p=simpleserver-moved-to-github.git;a=blobdiff_plain;f=ztest.pl;h=ea330b0b2e1449eb9bf82980f915fb9299a93bd4;hp=c5bec85292ca6d6142f0c9f291725dbc4c3b5ff6;hb=91eca62980c3a849143dbcce16d60c8316a52b01;hpb=944da8b68f4a7191ce8a989f43b28ff853ac9120 diff --git a/ztest.pl b/ztest.pl index c5bec85..ea330b0 100755 --- a/ztest.pl +++ b/ztest.pl @@ -1,6 +1,6 @@ #!/usr/bin/perl -w -## $Id: ztest.pl,v 1.16 2007-03-07 11:25:29 mike Exp $ +## $Id: ztest.pl,v 1.17 2007-03-08 14:51:32 mike Exp $ ## ------------------------------------------------------------------ ## ## Copyright (c) 2000-2004, Index Data. @@ -106,10 +106,6 @@ my $_counter = 0; sub my_search_handler { my $args = shift; - if ($_fail_frequency != 0 && ++$_counter % $_fail_frequency == 0) { - print "Exiting to be nasty to client\n"; - exit(1); - } my $data = [{ name => "Peter Dornan", title => "Spokesman", @@ -139,6 +135,10 @@ sub my_search_handler { $args->{HITS} = $hits; $session->{$set_id} = $data; $session->{__HITS} = $hits; + if ($_fail_frequency != 0 && ++$_counter % $_fail_frequency == 0) { + print "Exiting to be nasty to client\n"; + exit(1); + } }