Fixing test tmp directory.
Project: http://git-wip-us.apache.org/repos/asf/incubator-blur/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-blur/commit/05bb056a Tree: http://git-wip-us.apache.org/repos/asf/incubator-blur/tree/05bb056a Diff: http://git-wip-us.apache.org/repos/asf/incubator-blur/diff/05bb056a Branch: refs/heads/0.2.0-newtypesystem Commit: 05bb056a2c1224758b32c0e38e3d4562fa252003 Parents: 23408a0 Author: Aaron McCurry <[email protected]> Authored: Mon Aug 12 11:13:53 2013 -0400 Committer: Aaron McCurry <[email protected]> Committed: Mon Aug 12 11:13:53 2013 -0400 ---------------------------------------------------------------------- .../apache/blur/manager/writer/BlurIndexReaderTest.java | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/05bb056a/blur-core/src/test/java/org/apache/blur/manager/writer/BlurIndexReaderTest.java ---------------------------------------------------------------------- diff --git a/blur-core/src/test/java/org/apache/blur/manager/writer/BlurIndexReaderTest.java b/blur-core/src/test/java/org/apache/blur/manager/writer/BlurIndexReaderTest.java index 42ffb99..bda57d5 100644 --- a/blur-core/src/test/java/org/apache/blur/manager/writer/BlurIndexReaderTest.java +++ b/blur-core/src/test/java/org/apache/blur/manager/writer/BlurIndexReaderTest.java @@ -21,6 +21,8 @@ import static org.junit.Assert.assertEquals; import java.io.File; import java.io.IOException; +import java.net.URI; +import java.net.URISyntaxException; import java.util.UUID; import java.util.concurrent.ExecutorService; @@ -80,16 +82,18 @@ public class BlurIndexReaderTest { } - private void setupWriter(Configuration configuration, long refresh) throws IOException { + private void setupWriter(Configuration configuration, long refresh) throws IOException, URISyntaxException { + String tableUri = new File(base, "table-store-" + UUID.randomUUID().toString()).toURI().toString(); + System.out.println("TableURI " + tableUri); TableDescriptor tableDescriptor = new TableDescriptor(); tableDescriptor.setName("test-table"); - tableDescriptor.setTableUri(new File(base, "table-store-" + UUID.randomUUID().toString()).toURI().toString()); + tableDescriptor.setTableUri(tableUri); tableDescriptor.setAnalyzerDefinition(new AnalyzerDefinition()); tableDescriptor.putToTableProperties("blur.shard.time.between.refreshs", Long.toString(refresh)); tableDescriptor.putToTableProperties("blur.shard.time.between.commits", Long.toString(1000)); TableContext tableContext = TableContext.create(tableDescriptor); - directory = FSDirectory.open(new File(tableDescriptor.getTableUri())); + directory = FSDirectory.open(new File(new URI(tableDescriptor.getTableUri()))); ShardContext shardContext = ShardContext.create(tableContext, "test-shard"); refresher = new BlurIndexRefresher(); @@ -121,7 +125,7 @@ public class BlurIndexReaderTest { } @Test - public void testBlurIndexWriter() throws IOException, InterruptedException { + public void testBlurIndexWriter() throws IOException, InterruptedException, URISyntaxException { setupWriter(configuration, 1); IndexSearcherClosable indexReader1 = reader.getIndexReader(); doWrite();
