Fixed unit test, issue was with the WAL was being replayed into the second test.
Project: http://git-wip-us.apache.org/repos/asf/incubator-blur/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-blur/commit/4ea50997 Tree: http://git-wip-us.apache.org/repos/asf/incubator-blur/tree/4ea50997 Diff: http://git-wip-us.apache.org/repos/asf/incubator-blur/diff/4ea50997 Branch: refs/heads/0.1.5 Commit: 4ea509974e35c01ad2a6bba419d10fa1e37cc913 Parents: f267be5 Author: Aaron McCurry <[email protected]> Authored: Wed May 1 08:19:25 2013 -0400 Committer: Aaron McCurry <[email protected]> Committed: Wed May 1 08:19:25 2013 -0400 ---------------------------------------------------------------------- .../blur/manager/writer/BlurNRTIndexTest.java | 13 +++++++------ 1 files changed, 7 insertions(+), 6 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/4ea50997/src/blur-core/src/test/java/org/apache/blur/manager/writer/BlurNRTIndexTest.java ---------------------------------------------------------------------- diff --git a/src/blur-core/src/test/java/org/apache/blur/manager/writer/BlurNRTIndexTest.java b/src/blur-core/src/test/java/org/apache/blur/manager/writer/BlurNRTIndexTest.java index 710a619..ef07fa8 100644 --- a/src/blur-core/src/test/java/org/apache/blur/manager/writer/BlurNRTIndexTest.java +++ b/src/blur-core/src/test/java/org/apache/blur/manager/writer/BlurNRTIndexTest.java @@ -79,15 +79,16 @@ public class BlurNRTIndexTest { private void setupWriter(Configuration configuration, long refresh) throws IOException { TableDescriptor tableDescriptor = new TableDescriptor(); tableDescriptor.setName("test-table"); - tableDescriptor.setTableUri(new File(base, "table-store-" + UUID.randomUUID().toString()).toURI().toString()); + String uuid = UUID.randomUUID().toString(); + tableDescriptor.setTableUri(new File(base, "table-store-" + uuid).toURI().toString()); tableDescriptor.setAnalyzerDefinition(new AnalyzerDefinition()); tableDescriptor.putToTableProperties("blur.shard.time.between.refreshs", Long.toString(refresh)); TableContext tableContext = TableContext.create(tableDescriptor); - FSDirectory directory = FSDirectory.open(new File(base, "index_" + UUID.randomUUID().toString())); - - ShardContext shardContext = ShardContext.create(tableContext, "test-shard"); - + File path = new File(base, "index_" + uuid); + path.mkdirs(); + FSDirectory directory = FSDirectory.open(path); + ShardContext shardContext = ShardContext.create(tableContext, "test-shard-" + uuid); writer = new BlurNRTIndex(shardContext, mergeScheduler, closer, directory, gc, service); } @@ -136,7 +137,7 @@ public class BlurNRTIndexTest { searcher.close(); } -// @Test + @Test public void testBlurIndexWriterFaster() throws IOException, InterruptedException { setupWriter(configuration, 100); IndexSearcherClosable searcher1 = writer.getIndexReader();
