From 8ce0a7deb64816ac70a4a5912985c985a8ce2e8e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Henrik=20Grubbstr=C3=B6m=20=28Grubba=29?=
 <grubba@grubba.org>
Date: Thu, 3 Apr 2003 16:36:25 +0200
Subject: [PATCH] Reduced the size of the test data to be nicer to slow
 machines. Added some __signal_watchdog()'s for the same reason.

Rev: src/post_modules/Bz2/testsuite.in:1.7
---
 src/post_modules/Bz2/testsuite.in | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/post_modules/Bz2/testsuite.in b/src/post_modules/Bz2/testsuite.in
index 96573f2541..d4ad660b76 100644
--- a/src/post_modules/Bz2/testsuite.in
+++ b/src/post_modules/Bz2/testsuite.in
@@ -72,7 +72,7 @@ test_any([[
   int j = 0;
   int flush_count = 0;
 
-  in_data = random_string(2000000);
+  in_data = random_string(100000);
   
   while(i + defl_chunk_size < sizeof(in_data)){
     if(flush_count != 7){
@@ -88,6 +88,8 @@ test_any([[
   
   packed += defl->finish(in_data[i..sizeof(in_data) - 1]);
   
+  __signal_watchdog();
+
   while(j + infl_chunk_size < sizeof(packed))
   {
     out_data += infl->inflate(packed[j..j + infl_chunk_size - 1]);
@@ -107,12 +109,14 @@ test_any([[
   Bz2.File read_file = Bz2.File();
   
   in_data = "jglaksdjalsdkfjwoeiruwoiurbenrbwenrwikerhwkeurwhfksnASDFASJFKSDJFASIGHSFGAFD34535234523426FSFGSFDGSDRHTWGDASDFASDF";
-  in_data = in_data * 100000;
+  in_data = in_data * 1000;	// ~115k
   
   write_file->write_open("test_data_tmp.bz2");
   write_file->write(in_data);
   write_file->close();
 
+  __signal_watchdog();
+
   read_file->read_open("test_data_tmp.bz2");
   out_data = read_file->read();
   read_file->close();
-- 
GitLab