summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorirfan <irfan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1999-07-16 05:18:42 +0000
committerirfan <irfan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1999-07-16 05:18:42 +0000
commit5d27859f35893b9f6c0b23fca7bda879db24676c (patch)
tree09f8018c5a028a6873bb9c7f10b5e4a6d05febdb
parent035de854300c4cca799de06da5867d25c3f0ea7d (diff)
downloadATCD-5d27859f35893b9f6c0b23fca7bda879db24676c.tar.gz
Changed test defaults.
-rw-r--r--tests/Cached_Conn_Test.cpp22
1 files changed, 12 insertions, 10 deletions
diff --git a/tests/Cached_Conn_Test.cpp b/tests/Cached_Conn_Test.cpp
index 5d3003ac3a1..d67e3f11400 100644
--- a/tests/Cached_Conn_Test.cpp
+++ b/tests/Cached_Conn_Test.cpp
@@ -162,9 +162,9 @@ enum Caching_Strategy_Type
};
// Default number of clients/servers.
-static int default_iterations = 2000;
static int listen_once = 1;
-static int iterations = default_iterations;
+static int iterations = 2000;
+static int user_has_specified_iterations = 0;
static double purge_percentage = 20;
static Caching_Strategy_Type caching_strategy_type = ACE_ALL;
static CACHED_CONNECT_STRATEGY *connect_strategy = 0;
@@ -395,6 +395,7 @@ parse_args (int argc, char *argv[])
break;
case 'i':
iterations = atoi (get_opt.optarg);
+ user_has_specified_iterations = 1;
break;
case 'p':
purge_percentage = atoi (get_opt.optarg);
@@ -438,12 +439,13 @@ main (int argc,
if (result != 0)
return result;
- if (iterations == default_iterations &&
+#if defined (ACE_WIN32)
+ // Somehow, on Win32, the <listen once> option allows us to create
+ // more handles.
+ if (!user_has_specified_iterations &&
listen_once)
- {
- default_iterations *= 2;
- iterations = default_iterations;
- }
+ iterations *= 2;
+#endif /* ACE_WIN32 */
// Start the test only if options are valid.
ACE_START_TEST (ASYS_TEXT ("Cached_Conn_Test"));
@@ -458,10 +460,10 @@ main (int argc,
caching_strategy_type = ACE_LRU;
test_caching_strategy_type ();
- // Default iterations are too many; we the user hasn't specified
+ // Default iterations are too many; if the user hasn't specified
// otherwise, we'll shrink the iterations for LFU and FIFO.
- if (iterations == default_iterations)
- iterations = default_iterations / 100;
+ if (!user_has_specified_iterations)
+ iterations /= 100;
caching_strategy_type = ACE_LFU;
test_caching_strategy_type ();