mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Test fix to Content Chunker.
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@18898 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -28,7 +28,6 @@ import java.util.HashSet;
|
||||
import java.util.Iterator;
|
||||
import java.util.Set;
|
||||
|
||||
import org.alfresco.repo.site.SiteServiceImpl;
|
||||
import org.alfresco.service.cmr.repository.ContentData;
|
||||
import org.alfresco.service.cmr.transfer.TransferException;
|
||||
import org.apache.commons.logging.Log;
|
||||
@@ -69,7 +68,7 @@ public class ContentChunkerImpl implements ContentChunker
|
||||
/**
|
||||
* work out whether the buffer has filled up and needs to be flushed
|
||||
*/
|
||||
Iterator iter = buffer.iterator();
|
||||
Iterator<ContentData> iter = buffer.iterator();
|
||||
long totalContentSize = 0;
|
||||
|
||||
while (iter.hasNext())
|
||||
|
@@ -83,7 +83,7 @@ public class ContentChunkerImplTest extends TestCase
|
||||
processedContent.clear();
|
||||
for(int i = 0; i < 11 ; i++)
|
||||
{
|
||||
chunker.addContent(new ContentData(null, null, 1, null));
|
||||
chunker.addContent(new ContentData("url" + i, null, 1, null));
|
||||
}
|
||||
assertEquals("size 10 not buffered", processedContent.size(), 10);
|
||||
|
||||
@@ -100,7 +100,7 @@ public class ContentChunkerImplTest extends TestCase
|
||||
processedContent.clear();
|
||||
for(int i = 0; i < 100 ; i++)
|
||||
{
|
||||
chunker.addContent(new ContentData(null, null, 3, null));
|
||||
chunker.addContent(new ContentData("url" + i, null, 3, null));
|
||||
}
|
||||
chunker.flush();
|
||||
assertEquals("size 100 not written", processedContent.size(), 100);
|
||||
|
Reference in New Issue
Block a user