mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
pollForSnapshotCount now only logs an error. Also added a check for too many snaphots to start with.
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@30058 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -22,7 +22,6 @@ import java.util.List;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
import org.alfresco.error.AlfrescoRuntimeException;
|
||||
import org.alfresco.model.ContentModel;
|
||||
import org.alfresco.repo.security.authentication.AuthenticationUtil;
|
||||
import org.alfresco.repo.transaction.RetryingTransactionHelper.RetryingTransactionCallback;
|
||||
@@ -227,9 +226,20 @@ public class AbstractWCMServiceImplTest extends TestCase
|
||||
|
||||
attempts++;
|
||||
|
||||
if (attempts > POLL_MAX_ATTEMPTS)
|
||||
if (attempts == 1 && cnt > expectedCnt)
|
||||
{
|
||||
throw new AlfrescoRuntimeException("Too many poll attempts: "+attempts);
|
||||
// There are already more snapshots
|
||||
break;
|
||||
}
|
||||
else if (attempts > POLL_MAX_ATTEMPTS)
|
||||
{
|
||||
logger.error(
|
||||
"Too many poll attempts: \n" +
|
||||
" Store: " + stagingStoreId + "\n" +
|
||||
" Time: " + (System.currentTimeMillis()-start) + "ms\n" +
|
||||
" Attempts: " + attempts);
|
||||
// This failure is too common
|
||||
// throw new AlfrescoRuntimeException("Too many poll attempts: "+attempts);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user