Skip to content

Commit

Permalink
Minor fix in unit test.
Browse files Browse the repository at this point in the history
  • Loading branch information
essiembre committed Dec 10, 2013
1 parent dc846bd commit e96bbc1
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 26 deletions.
28 changes: 4 additions & 24 deletions norconex-committer/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,6 @@ along with Norconex Committer. If not, see <http://www.gnu.org/licenses/>.
</repositories>

<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.11</version>
<scope>test</scope>
</dependency>
<!--
<dependency>
<groupId>org.mockito</groupId>
Expand All @@ -91,30 +85,16 @@ along with Norconex Committer. If not, see <http://www.gnu.org/licenses/>.
</dependency>
-->

<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.4</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.1</version>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.17</version>
</dependency>
<dependency>
<groupId>com.norconex.commons</groupId>
<artifactId>norconex-commons-lang</artifactId>
<version>1.2.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>commons-configuration</groupId>
<artifactId>commons-configuration</artifactId>
<version>1.9</version>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.11</version>
<scope>test</scope>
</dependency>
</dependencies>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ public void visit(File file) {
}
});

//TODO move this to finalize() to truly respect the commit size?
commitComplete();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,13 @@
* @author Pascal Dimassimo
* @author Pascal Essiembre
*/
@SuppressWarnings("nls")
@SuppressWarnings({"nls","javadoc"})
public class AbstractMappedCommitterTest {



@Rule
private TemporaryFolder tempFolder = new TemporaryFolder();
public TemporaryFolder tempFolder = new TemporaryFolder();
private StubCommitter committer;
private boolean committed;

Expand Down Expand Up @@ -140,6 +140,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();

// Get the map generated
assertEquals(1, committer.getCommitBatch().size());
Expand Down Expand Up @@ -183,6 +184,7 @@ public List<ICommitOperation> getCommitBatch() {

@Override
protected void commitComplete() {
super.commitComplete();
committed = true;
}

Expand Down

0 comments on commit e96bbc1

Please sign in to comment.