Skip to content

Commit

Permalink
Fixed failing test.
Browse files Browse the repository at this point in the history
  • Loading branch information
essiembre committed Dec 11, 2013
1 parent 6328bd6 commit 23d8af2
Showing 1 changed file with 4 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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());
Expand All @@ -156,44 +157,27 @@ class StubCommitter extends AbstractMappedCommitter {
private static final long serialVersionUID = 5395010993071444611L;

private List<ICommitOperation> commitBatch;



@Override
protected void commitBatch(List<ICommitOperation> batch) {
commitBatch = batch;
commitBatch = new ArrayList<ICommitOperation>(batch);
}

/**
* @return the operationCount
*/
public List<ICommitOperation> 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
Expand Down

0 comments on commit 23d8af2

Please sign in to comment.