From 0a10ba1d7efed0f56618bb8c87cd342d8ff443ab Mon Sep 17 00:00:00 2001 From: Travis Keep Date: Fri, 7 Aug 2015 13:39:05 +0000 Subject: [PATCH] ICU-11767 Fix brokenbuild. X-SVN-Rev: 37730 --- icu4c/source/test/intltest/tsmthred.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/icu4c/source/test/intltest/tsmthred.cpp b/icu4c/source/test/intltest/tsmthred.cpp index be1584942ee..9fabb4afee7 100644 --- a/icu4c/source/test/intltest/tsmthred.cpp +++ b/icu4c/source/test/intltest/tsmthred.cpp @@ -1493,9 +1493,10 @@ void MultithreadTest::TestUnifiedCache() { } // We know that each thread cannot create more than 2 objects in // the cache, and there are UPRV_LENGTHOF(gCacheLocales) pairs of - // objects fetched from the cache - if (gObjectsCreated > 2 * UPRV_LENGTHOF(gCacheLocales)) { - errln("%s:%d Too many objects created, got %d, expected %d", __FILE__, __LINE__, gObjectsCreated, 2 * UPRV_LENGTHOF(gCacheLocales)); + // objects fetched from the cache. If the threads run in series because + // of eviction, at worst case each thread creates two objects. + if (gObjectsCreated > 2 * CACHE_LOAD * UPRV_LENGTHOF(gCacheLocales)) { + errln("%s:%d Too many objects created, got %d, expected %d", __FILE__, __LINE__, gObjectsCreated, 2 * CACHE_LOAD * UPRV_LENGTHOF(gCacheLocales)); } -- 2.40.0