From 23d8af25088b263c8b873e6a4f6a0f52b954fe3d Mon Sep 17 00:00:00 2001 From: Pascal Essiembre Date: Wed, 11 Dec 2013 00:31:34 -0500 Subject: [PATCH] Fixed failing test. --- .../AbstractMappedCommitterTest.java | 24 ++++--------------- 1 file changed, 4 insertions(+), 20 deletions(-) diff --git a/norconex-committer/src/test/java/com/norconex/committer/AbstractMappedCommitterTest.java b/norconex-committer/src/test/java/com/norconex/committer/AbstractMappedCommitterTest.java index f228ea5..cdadbbe 100644 --- a/norconex-committer/src/test/java/com/norconex/committer/AbstractMappedCommitterTest.java +++ b/norconex-committer/src/test/java/com/norconex/committer/AbstractMappedCommitterTest.java @@ -23,6 +23,7 @@ import java.io.File; import java.io.IOException; +import java.util.ArrayList; import java.util.List; import javax.xml.stream.XMLStreamException; @@ -140,7 +141,7 @@ public void testKeepSourceId() throws IOException { // Add a doc (it should trigger a commit because batch size is 1) committer.setQueueSize(1); committer.queueAdd(defaultReference, tempFolder.newFile(), metadata); -// committer.commit(); + committer.commit(); // Get the map generated assertEquals(1, committer.getCommitBatch().size()); @@ -156,44 +157,27 @@ class StubCommitter extends AbstractMappedCommitter { private static final long serialVersionUID = 5395010993071444611L; private List commitBatch; - - + @Override protected void commitBatch(List batch) { - commitBatch = batch; + commitBatch = new ArrayList(batch); } - /** * @return the operationCount */ public List getCommitBatch() { return commitBatch; } - -// @Override -// protected void commitAddedDocument(QueuedAddedDocument document) -// throws IOException { -// listCommitAdd.add(document); -// } -// -// @Override -// protected void commitDeletedDocument(QueuedDeletedDocument document) -// throws IOException { -// //TODO implement me -// } - @Override protected void commitComplete() { super.commitComplete(); committed = true; } - @Override protected void saveToXML(XMLStreamWriter writer) throws XMLStreamException { // no saving } - @Override protected void loadFromXml(XMLConfiguration xml) { // no loading