Merged HEAD-BUG-FIX (5.0/Cloud) to HEAD (4.3/Cloud)

73353: Merged V4.2-BUG-FIX (4.2.3) to HEAD-BUG-FIX (4.3/Cloud)
      73240: Merged DEV to V4.2-BUG-FIX (4.2.3)
         73207: MNT-11314 : Intermittent test failure: CachedContentCleanupJobTest.filesNewerThanMinFileAgeMillisAreNotDeleted
         Hardened the test.


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@74771 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Will Abson
2014-06-25 15:59:16 +00:00
parent 7f6997d65b
commit a6cd47c741

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2005-2011 Alfresco Software Limited.
* Copyright (C) 2005-2014 Alfresco Software Limited.
*
* This file is part of Alfresco
*
@@ -19,9 +19,7 @@
package org.alfresco.repo.content.caching.cleanup;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.*;
import java.io.File;
import java.io.FileNotFoundException;
@@ -124,7 +122,7 @@ public class CachedContentCleanupJobTest
@Test
public void filesNewerThanMinFileAgeMillisAreNotDeleted() throws InterruptedException
{
final long minFileAge = 1000;
final long minFileAge = 5000;
cleaner.setMinFileAgeMillis(minFileAge);
cleaner.setMaxDeleteWatchCount(0);
int numFiles = 10;
@@ -156,7 +154,13 @@ public class CachedContentCleanupJobTest
{
Thread.sleep(200);
}
if (cleaner.getDurationMillis() > minFileAge)
{
fail("Test unable to complete, since cleaner took " + cleaner.getDurationMillis() + "ms" +
" which is longer than minFileAge [" + minFileAge + "ms]");
}
// check all 'old' files deleted
for (File file : oldFiles)
{