From 69b4cd22a2d2f7e09802f46fead3b71352c18ff3 Mon Sep 17 00:00:00 2001 From: Vinnie Falco Date: Tue, 3 Feb 2015 17:54:30 -0800 Subject: [PATCH] Speed up some unit tests: A few of the slowest unit tests are modified to process a smaller data set size, to reduce the time required to run all unit tests. --- src/beast/beast/chrono/tests/abstract_clock.test.cpp | 2 +- src/beast/beast/nudb/tests/recover_test.cpp | 5 ++--- src/beast/beast/nudb/tests/store_test.cpp | 4 ++++ 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/beast/beast/chrono/tests/abstract_clock.test.cpp b/src/beast/beast/chrono/tests/abstract_clock.test.cpp index 1e5e3b0fc..316147ba7 100644 --- a/src/beast/beast/chrono/tests/abstract_clock.test.cpp +++ b/src/beast/beast/chrono/tests/abstract_clock.test.cpp @@ -88,6 +88,6 @@ public: } }; -BEAST_DEFINE_TESTSUITE(abstract_clock,chrono,beast); +BEAST_DEFINE_TESTSUITE_MANUAL(abstract_clock,chrono,beast); } diff --git a/src/beast/beast/nudb/tests/recover_test.cpp b/src/beast/beast/nudb/tests/recover_test.cpp index 5700b2e4c..0cf9da881 100644 --- a/src/beast/beast/nudb/tests/recover_test.cpp +++ b/src/beast/beast/nudb/tests/recover_test.cpp @@ -156,6 +156,7 @@ public: test_recover (lf, 0); test_recover (lf, 10); test_recover (lf, 100); + test_recover (lf, 1000); } }; @@ -168,13 +169,11 @@ public: run() override { float lf = 0.90f; - test_recover (lf, 1000); test_recover (lf, 10000); + test_recover (lf, 100000); } }; -BEAST_DEFINE_TESTSUITE_MANUAL(recover_big,nudb,beast); - } // test } // nudb } // beast diff --git a/src/beast/beast/nudb/tests/store_test.cpp b/src/beast/beast/nudb/tests/store_test.cpp index 20a1f6bf0..32b84759c 100644 --- a/src/beast/beast/nudb/tests/store_test.cpp +++ b/src/beast/beast/nudb/tests/store_test.cpp @@ -124,7 +124,11 @@ public: { enum { + #ifndef NDEBUG + N = 5000 // debug + #else N = 50000 + #endif ,block_size = 256 };