polygene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From paulmer...@apache.org
Subject [24/35] zest-java git commit: tests: use fileconfig convention everywhere
Date Sat, 19 Nov 2016 22:50:25 GMT
tests: use fileconfig convention everywhere


Project: http://git-wip-us.apache.org/repos/asf/zest-java/repo
Commit: http://git-wip-us.apache.org/repos/asf/zest-java/commit/86b89c63
Tree: http://git-wip-us.apache.org/repos/asf/zest-java/tree/86b89c63
Diff: http://git-wip-us.apache.org/repos/asf/zest-java/diff/86b89c63

Branch: refs/heads/develop
Commit: 86b89c63309f5fa985da92e3eabf33af5079be22
Parents: 5018cf5
Author: Paul Merlin <paulmerlin@apache.org>
Authored: Sat Nov 19 16:22:39 2016 +0100
Committer: Paul Merlin <paulmerlin@apache.org>
Committed: Sat Nov 19 16:22:39 2016 +0100

----------------------------------------------------------------------
 .../ElasticSearchComplexQueryTest.java          |  19 +-
 .../elasticsearch/ElasticSearchFinderTest.java  |  17 +-
 .../ElasticSearchQueryMultimoduleTest.java      |  19 +-
 .../elasticsearch/ElasticSearchQueryTest.java   |  25 +-
 .../index/elasticsearch/ElasticSearchTest.java  |  26 +-
 .../index/elasticsearch/ImmenseTermTest.java    |  23 +-
 .../apache/zest/index/rdf/ContainsAllTest.java  |   9 +-
 .../org/apache/zest/index/rdf/ContainsTest.java | 304 +++++++++----------
 .../zest/index/rdf/RDFPerformanceTest.java      |   8 +-
 .../zest/index/rdf/RdfQueryMultimoduleTest.java |   9 +-
 .../org/apache/zest/index/rdf/RdfQueryTest.java |   9 +-
 .../zest/index/rdf/qi95/Qi95IssueTest.java      |   7 +-
 .../zest/index/solr/SolrEntityFinderTest.java   |  18 +-
 .../zest/index/solr/SolrNamedQueryTest.java     |  22 +-
 .../zest/index/solr/SolrQueryServiceTest.java   |  30 +-
 .../apache/zest/index/solr/SolrQueryTest.java   |  18 +-
 16 files changed, 229 insertions(+), 334 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/zest-java/blob/86b89c63/extensions/indexing-elasticsearch/src/test/java/org/apache/zest/index/elasticsearch/ElasticSearchComplexQueryTest.java
----------------------------------------------------------------------
diff --git a/extensions/indexing-elasticsearch/src/test/java/org/apache/zest/index/elasticsearch/ElasticSearchComplexQueryTest.java b/extensions/indexing-elasticsearch/src/test/java/org/apache/zest/index/elasticsearch/ElasticSearchComplexQueryTest.java
index d1b55e9..bbb9c76 100644
--- a/extensions/indexing-elasticsearch/src/test/java/org/apache/zest/index/elasticsearch/ElasticSearchComplexQueryTest.java
+++ b/extensions/indexing-elasticsearch/src/test/java/org/apache/zest/index/elasticsearch/ElasticSearchComplexQueryTest.java
@@ -17,10 +17,6 @@
  */
 package org.apache.zest.index.elasticsearch;
 
-import java.io.File;
-import org.junit.BeforeClass;
-import org.junit.Ignore;
-import org.junit.Rule;
 import org.apache.zest.api.common.Visibility;
 import org.apache.zest.bootstrap.AssemblyException;
 import org.apache.zest.bootstrap.ModuleAssembly;
@@ -29,7 +25,10 @@ import org.apache.zest.library.fileconfig.FileConfigurationOverride;
 import org.apache.zest.library.fileconfig.FileConfigurationService;
 import org.apache.zest.test.EntityTestAssembler;
 import org.apache.zest.test.indexing.AbstractComplexQueryTest;
-import org.apache.zest.test.util.DelTreeAfter;
+import org.junit.BeforeClass;
+import org.junit.Ignore;
+import org.junit.Rule;
+import org.junit.rules.TemporaryFolder;
 
 import static org.apache.zest.test.util.Assume.assumeNoIbmJdk;
 
@@ -37,9 +36,8 @@ import static org.apache.zest.test.util.Assume.assumeNoIbmJdk;
 public class ElasticSearchComplexQueryTest
     extends AbstractComplexQueryTest
 {
-    private static final File DATA_DIR = new File( "build/tmp/es-complex-query-test" );
     @Rule
-    public final DelTreeAfter delTreeAfter = new DelTreeAfter( DATA_DIR );
+    public TemporaryFolder tmpDir = new TemporaryFolder();
 
     @BeforeClass
     public static void beforeClass_IBMJDK()
@@ -65,11 +63,8 @@ public class ElasticSearchComplexQueryTest
         esConfig.indexNonAggregatedAssociations().set( Boolean.TRUE );
 
         // FileConfig
-        FileConfigurationOverride override = new FileConfigurationOverride()
-            .withData( new File( DATA_DIR, "zest-data" ) )
-            .withLog( new File( DATA_DIR, "zest-logs" ) )
-            .withTemporary( new File( DATA_DIR, "zest-temp" ) );
-        module.services( FileConfigurationService.class ).setMetaInfo( override );
+        module.services( FileConfigurationService.class )
+              .setMetaInfo( new FileConfigurationOverride().withConventionalRoot( tmpDir.getRoot() ) );
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/zest-java/blob/86b89c63/extensions/indexing-elasticsearch/src/test/java/org/apache/zest/index/elasticsearch/ElasticSearchFinderTest.java
----------------------------------------------------------------------
diff --git a/extensions/indexing-elasticsearch/src/test/java/org/apache/zest/index/elasticsearch/ElasticSearchFinderTest.java b/extensions/indexing-elasticsearch/src/test/java/org/apache/zest/index/elasticsearch/ElasticSearchFinderTest.java
index d990a7a..86ece1a 100644
--- a/extensions/indexing-elasticsearch/src/test/java/org/apache/zest/index/elasticsearch/ElasticSearchFinderTest.java
+++ b/extensions/indexing-elasticsearch/src/test/java/org/apache/zest/index/elasticsearch/ElasticSearchFinderTest.java
@@ -17,9 +17,6 @@
  */
 package org.apache.zest.index.elasticsearch;
 
-import java.io.File;
-import org.junit.BeforeClass;
-import org.junit.Rule;
 import org.apache.zest.api.common.Visibility;
 import org.apache.zest.bootstrap.AssemblyException;
 import org.apache.zest.bootstrap.ModuleAssembly;
@@ -28,16 +25,17 @@ import org.apache.zest.library.fileconfig.FileConfigurationOverride;
 import org.apache.zest.library.fileconfig.FileConfigurationService;
 import org.apache.zest.test.EntityTestAssembler;
 import org.apache.zest.test.indexing.AbstractEntityFinderTest;
-import org.apache.zest.test.util.DelTreeAfter;
+import org.junit.BeforeClass;
+import org.junit.Rule;
+import org.junit.rules.TemporaryFolder;
 
 import static org.apache.zest.test.util.Assume.assumeNoIbmJdk;
 
 public class ElasticSearchFinderTest
     extends AbstractEntityFinderTest
 {
-    private static final File DATA_DIR = new File( "build/tmp/es-finder-test" );
     @Rule
-    public final DelTreeAfter delTreeAfter = new DelTreeAfter( DATA_DIR );
+    public TemporaryFolder tmpDir = new TemporaryFolder();
 
     @BeforeClass
     public static void beforeClass_IBMJDK()
@@ -63,11 +61,8 @@ public class ElasticSearchFinderTest
         esConfig.indexNonAggregatedAssociations().set( Boolean.TRUE );
 
         // FileConfig
-        FileConfigurationOverride override = new FileConfigurationOverride()
-            .withData( new File( DATA_DIR, "zest-data" ) )
-            .withLog( new File( DATA_DIR, "zest-logs" ) )
-            .withTemporary( new File( DATA_DIR, "zest-temp" ) );
-        module.services( FileConfigurationService.class ).setMetaInfo( override );
+        module.services( FileConfigurationService.class )
+              .setMetaInfo( new FileConfigurationOverride().withConventionalRoot( tmpDir.getRoot() ) );
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/zest-java/blob/86b89c63/extensions/indexing-elasticsearch/src/test/java/org/apache/zest/index/elasticsearch/ElasticSearchQueryMultimoduleTest.java
----------------------------------------------------------------------
diff --git a/extensions/indexing-elasticsearch/src/test/java/org/apache/zest/index/elasticsearch/ElasticSearchQueryMultimoduleTest.java b/extensions/indexing-elasticsearch/src/test/java/org/apache/zest/index/elasticsearch/ElasticSearchQueryMultimoduleTest.java
index 240f0ee..5b8ff58 100644
--- a/extensions/indexing-elasticsearch/src/test/java/org/apache/zest/index/elasticsearch/ElasticSearchQueryMultimoduleTest.java
+++ b/extensions/indexing-elasticsearch/src/test/java/org/apache/zest/index/elasticsearch/ElasticSearchQueryMultimoduleTest.java
@@ -19,9 +19,6 @@
  */
 package org.apache.zest.index.elasticsearch;
 
-import java.io.File;
-import java.io.IOException;
-import java.io.UncheckedIOException;
 import org.apache.zest.api.common.Visibility;
 import org.apache.zest.bootstrap.AssemblyException;
 import org.apache.zest.bootstrap.LayerAssembly;
@@ -60,19 +57,7 @@ public class ElasticSearchQueryMultimoduleTest extends ElasticSearchQueryTest
         esConfig.indexNonAggregatedAssociations().set( Boolean.TRUE );
 
         // FileConfig
-        try
-        {
-            File dir = tmpDir.newFolder();
-            FileConfigurationOverride override = new FileConfigurationOverride()
-                .withData( new File( dir, "zest-data" ) )
-                .withLog( new File( dir, "zest-logs" ) )
-                .withTemporary( new File( dir, "zest-temp" ) );
-            module.services( FileConfigurationService.class ).
-                setMetaInfo( override );
-        }
-        catch( IOException e )
-        {
-            throw new UncheckedIOException( e );
-        }
+        module.services( FileConfigurationService.class )
+              .setMetaInfo( new FileConfigurationOverride().withConventionalRoot( tmpDir.getRoot() ) );
     }
 }

http://git-wip-us.apache.org/repos/asf/zest-java/blob/86b89c63/extensions/indexing-elasticsearch/src/test/java/org/apache/zest/index/elasticsearch/ElasticSearchQueryTest.java
----------------------------------------------------------------------
diff --git a/extensions/indexing-elasticsearch/src/test/java/org/apache/zest/index/elasticsearch/ElasticSearchQueryTest.java b/extensions/indexing-elasticsearch/src/test/java/org/apache/zest/index/elasticsearch/ElasticSearchQueryTest.java
index 6d0db9e..3feeff0 100644
--- a/extensions/indexing-elasticsearch/src/test/java/org/apache/zest/index/elasticsearch/ElasticSearchQueryTest.java
+++ b/extensions/indexing-elasticsearch/src/test/java/org/apache/zest/index/elasticsearch/ElasticSearchQueryTest.java
@@ -20,9 +20,7 @@
 
 package org.apache.zest.index.elasticsearch;
 
-import java.io.File;
 import java.io.IOException;
-import java.io.UncheckedIOException;
 import org.apache.zest.api.common.Visibility;
 import org.apache.zest.bootstrap.AssemblyException;
 import org.apache.zest.bootstrap.ModuleAssembly;
@@ -49,14 +47,8 @@ public class ElasticSearchQueryTest
         assumeNoIbmJdk();
     }
 
-    @BeforeClass
-    public static void beforeClass_TMP()
-    {
-        new File( "build/tmp/es-query-test" ).mkdirs();
-    }
-
     @Rule
-    public TemporaryFolder tmpDir = new TemporaryFolder( new File( "build/tmp/es-query-test" ) );
+    public TemporaryFolder tmpDir = new TemporaryFolder();
 
     @Override
     public void assemble( ModuleAssembly module )
@@ -74,19 +66,8 @@ public class ElasticSearchQueryTest
         esConfig.indexNonAggregatedAssociations().set( Boolean.TRUE );
 
         // FileConfig
-        try
-        {
-            File dir = tmpDir.newFolder();
-            FileConfigurationOverride override = new FileConfigurationOverride()
-                .withData( new File( dir, "zest-data" ) )
-                .withLog( new File( dir, "zest-logs" ) )
-                .withTemporary( new File( dir, "zest-temp" ) );
-            module.services( FileConfigurationService.class ).setMetaInfo( override );
-        }
-        catch( IOException e )
-        {
-            throw new UncheckedIOException( e );
-        }
+        module.services( FileConfigurationService.class )
+              .setMetaInfo( new FileConfigurationOverride().withConventionalRoot( tmpDir.getRoot() ) );
     }
 
     @Test

http://git-wip-us.apache.org/repos/asf/zest-java/blob/86b89c63/extensions/indexing-elasticsearch/src/test/java/org/apache/zest/index/elasticsearch/ElasticSearchTest.java
----------------------------------------------------------------------
diff --git a/extensions/indexing-elasticsearch/src/test/java/org/apache/zest/index/elasticsearch/ElasticSearchTest.java b/extensions/indexing-elasticsearch/src/test/java/org/apache/zest/index/elasticsearch/ElasticSearchTest.java
index 821ecf8..8240d3b 100644
--- a/extensions/indexing-elasticsearch/src/test/java/org/apache/zest/index/elasticsearch/ElasticSearchTest.java
+++ b/extensions/indexing-elasticsearch/src/test/java/org/apache/zest/index/elasticsearch/ElasticSearchTest.java
@@ -19,9 +19,6 @@
  */
 package org.apache.zest.index.elasticsearch;
 
-import java.io.File;
-import java.io.IOException;
-import java.io.UncheckedIOException;
 import org.apache.zest.api.association.Association;
 import org.apache.zest.api.association.ManyAssociation;
 import org.apache.zest.api.common.UseDefaults;
@@ -63,14 +60,8 @@ public class ElasticSearchTest
         assumeNoIbmJdk();
     }
 
-    @BeforeClass
-    public static void beforeClass_TMP()
-    {
-        new File( "build/tmp/es-query-test" ).mkdirs();
-    }
-
     @Rule
-    public TemporaryFolder tmpDir = new TemporaryFolder( new File( "build/tmp/es-query-test" ) );
+    public TemporaryFolder tmpDir = new TemporaryFolder();
 
     public interface Post
         extends HasIdentity
@@ -138,19 +129,8 @@ public class ElasticSearchTest
         esConfig.indexNonAggregatedAssociations().set( Boolean.TRUE );
 
         // FileConfig
-        try
-        {
-            File dir = tmpDir.newFolder();
-            FileConfigurationOverride override = new FileConfigurationOverride()
-                .withData( new File( dir, "zest-data" ) )
-                .withLog( new File( dir, "zest-logs" ) )
-                .withTemporary( new File( dir, "zest-temp" ) );
-            module.services( FileConfigurationService.class ).setMetaInfo( override );
-        }
-        catch( IOException e )
-        {
-            throw new UncheckedIOException( e );
-        }
+        module.services( FileConfigurationService.class )
+              .setMetaInfo( new FileConfigurationOverride().withConventionalRoot( tmpDir.getRoot() ) );
 
         // Entities & Values
         module.entities( Post.class, Page.class, Author.class, Comment.class );

http://git-wip-us.apache.org/repos/asf/zest-java/blob/86b89c63/extensions/indexing-elasticsearch/src/test/java/org/apache/zest/index/elasticsearch/ImmenseTermTest.java
----------------------------------------------------------------------
diff --git a/extensions/indexing-elasticsearch/src/test/java/org/apache/zest/index/elasticsearch/ImmenseTermTest.java b/extensions/indexing-elasticsearch/src/test/java/org/apache/zest/index/elasticsearch/ImmenseTermTest.java
index 88002f3..e7c55b2 100644
--- a/extensions/indexing-elasticsearch/src/test/java/org/apache/zest/index/elasticsearch/ImmenseTermTest.java
+++ b/extensions/indexing-elasticsearch/src/test/java/org/apache/zest/index/elasticsearch/ImmenseTermTest.java
@@ -20,11 +20,7 @@
 
 package org.apache.zest.index.elasticsearch;
 
-import java.io.File;
 import java.util.List;
-import org.junit.BeforeClass;
-import org.junit.Rule;
-import org.junit.Test;
 import org.apache.zest.api.association.ManyAssociation;
 import org.apache.zest.api.common.Optional;
 import org.apache.zest.api.common.Visibility;
@@ -40,13 +36,16 @@ import org.apache.zest.library.fileconfig.FileConfigurationOverride;
 import org.apache.zest.library.fileconfig.FileConfigurationService;
 import org.apache.zest.test.AbstractZestTest;
 import org.apache.zest.test.EntityTestAssembler;
-import org.apache.zest.test.util.DelTreeAfter;
+import org.junit.BeforeClass;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.rules.TemporaryFolder;
 
-import static org.hamcrest.core.Is.is;
-import static org.junit.Assert.assertThat;
 import static org.apache.zest.api.query.QueryExpressions.eq;
 import static org.apache.zest.api.query.QueryExpressions.templateFor;
 import static org.apache.zest.test.util.Assume.assumeNoIbmJdk;
+import static org.hamcrest.core.Is.is;
+import static org.junit.Assert.assertThat;
 
 /**
  * ImmenseTermTest.
@@ -56,9 +55,8 @@ import static org.apache.zest.test.util.Assume.assumeNoIbmJdk;
 public class ImmenseTermTest
     extends AbstractZestTest
 {
-    private static final File DATA_DIR = new File( "build/tmp/immense-term-test" );
     @Rule
-    public final DelTreeAfter delTreeAfter = new DelTreeAfter( DATA_DIR );
+    public TemporaryFolder tmpDir = new TemporaryFolder();
 
     @BeforeClass
     public static void beforeClass_IBMJDK()
@@ -105,11 +103,8 @@ public class ImmenseTermTest
         esConfig.indexNonAggregatedAssociations().set( Boolean.TRUE );
 
         // FileConfig
-        FileConfigurationOverride override = new FileConfigurationOverride()
-            .withData( new File( DATA_DIR, "zest-data" ) )
-            .withLog( new File( DATA_DIR, "zest-logs" ) )
-            .withTemporary( new File( DATA_DIR, "zest-temp" ) );
-        module.services( FileConfigurationService.class ).setMetaInfo( override );
+        module.services( FileConfigurationService.class )
+              .setMetaInfo( new FileConfigurationOverride().withConventionalRoot( tmpDir.getRoot() ) );
 
         // Entities & Values
         module.entities( TestEntity.class, TestEntity2.class );

http://git-wip-us.apache.org/repos/asf/zest-java/blob/86b89c63/extensions/indexing-rdf/src/test/java/org/apache/zest/index/rdf/ContainsAllTest.java
----------------------------------------------------------------------
diff --git a/extensions/indexing-rdf/src/test/java/org/apache/zest/index/rdf/ContainsAllTest.java b/extensions/indexing-rdf/src/test/java/org/apache/zest/index/rdf/ContainsAllTest.java
index 6827840..c3f6195 100644
--- a/extensions/indexing-rdf/src/test/java/org/apache/zest/index/rdf/ContainsAllTest.java
+++ b/extensions/indexing-rdf/src/test/java/org/apache/zest/index/rdf/ContainsAllTest.java
@@ -19,7 +19,6 @@
  */
 package org.apache.zest.index.rdf;
 
-import java.io.File;
 import org.junit.Assert;
 import org.junit.Test;
 import org.apache.zest.api.common.Visibility;
@@ -46,15 +45,14 @@ import java.util.Arrays;
 import java.util.HashSet;
 import java.util.Set;
 import org.junit.Rule;
-import org.apache.zest.test.util.DelTreeAfter;
+import org.junit.rules.TemporaryFolder;
 
 // A test to verify that containsAll QueryExpression works properly.
 public class ContainsAllTest
     extends AbstractZestTest
 {
-    private static final File DATA_DIR = new File( "build/tmp/contains-all-test" );
     @Rule
-    public final DelTreeAfter delTreeAfter = new DelTreeAfter( DATA_DIR );
+    public TemporaryFolder tmpDir = new TemporaryFolder();
 
     public static final String TEST_STRING_1 = "TestString1";
     public static final String TEST_STRING_2 = "Some\\Weird\"$String/[]";
@@ -92,7 +90,8 @@ public class ContainsAllTest
         module.services( FileConfigurationService.class );
         ModuleAssembly prefModule = module.layer().module( "PrefModule" );
         prefModule.entities( NativeConfiguration.class ).visibleIn( Visibility.application );
-        prefModule.forMixin( NativeConfiguration.class ).declareDefaults().dataDirectory().set( DATA_DIR.getAbsolutePath() );
+        prefModule.forMixin( NativeConfiguration.class ).declareDefaults()
+                  .dataDirectory().set( tmpDir.getRoot().getAbsolutePath() );
         new EntityTestAssembler().assemble( prefModule );
 
         module.entities( ExampleEntity.class );

http://git-wip-us.apache.org/repos/asf/zest-java/blob/86b89c63/extensions/indexing-rdf/src/test/java/org/apache/zest/index/rdf/ContainsTest.java
----------------------------------------------------------------------
diff --git a/extensions/indexing-rdf/src/test/java/org/apache/zest/index/rdf/ContainsTest.java b/extensions/indexing-rdf/src/test/java/org/apache/zest/index/rdf/ContainsTest.java
index 45a1ef8..f864fcb 100644
--- a/extensions/indexing-rdf/src/test/java/org/apache/zest/index/rdf/ContainsTest.java
+++ b/extensions/indexing-rdf/src/test/java/org/apache/zest/index/rdf/ContainsTest.java
@@ -19,7 +19,6 @@
  */
 package org.apache.zest.index.rdf;
 
-import java.io.File;
 import org.junit.Assert;
 import org.junit.Test;
 import org.apache.zest.api.common.Visibility;
@@ -43,169 +42,168 @@ import java.util.Arrays;
 import java.util.HashSet;
 import java.util.Set;
 import org.junit.Rule;
-import org.apache.zest.test.util.DelTreeAfter;
+import org.junit.rules.TemporaryFolder;
 
 public class ContainsTest extends AbstractZestTest
 {
-
-   private static final File DATA_DIR = new File( "build/tmp/contains-test" );
-   @Rule
-   public final DelTreeAfter delTreeAfter = new DelTreeAfter( DATA_DIR );
-
-   @Override
-   public void assemble(ModuleAssembly module) throws AssemblyException
-   {
-       module.services( FileConfigurationService.class );
-      ModuleAssembly prefModule = module.layer().module( "PrefModule" );
-      prefModule.entities( NativeConfiguration.class ).visibleIn(Visibility.application);
-      prefModule.forMixin( NativeConfiguration.class ).declareDefaults().dataDirectory().set( DATA_DIR.getAbsolutePath() );
-      new EntityTestAssembler().assemble( prefModule );
-
-      module.entities( ExampleEntity.class );
-      module.values( ExampleValue.class, ExampleValue2.class );
-
-      EntityTestAssembler testAss = new EntityTestAssembler();
-      testAss.assemble(module);
-
-      RdfNativeSesameStoreAssembler rdfAssembler = new RdfNativeSesameStoreAssembler();
-      rdfAssembler.assemble(module);
-   }
-
-   @Test
-   public void simpleContainsSuccessTest() throws Exception
-   {
-      ExampleEntity result = this.performContainsStringTest(
-            new HashSet<String>(Arrays.asList(
-                  ContainsAllTest.TEST_STRING_1, ContainsAllTest.TEST_STRING_2, ContainsAllTest.TEST_STRING_3
-                  )),
+    @Rule
+    public TemporaryFolder tmpDir = new TemporaryFolder();
+
+    @Override
+    public void assemble( ModuleAssembly module ) throws AssemblyException
+    {
+        module.services( FileConfigurationService.class );
+        ModuleAssembly prefModule = module.layer().module( "PrefModule" );
+        prefModule.entities( NativeConfiguration.class ).visibleIn( Visibility.application );
+        prefModule.forMixin( NativeConfiguration.class ).declareDefaults()
+                  .dataDirectory().set( tmpDir.getRoot().getAbsolutePath() );
+        new EntityTestAssembler().assemble( prefModule );
+
+        module.entities( ExampleEntity.class );
+        module.values( ExampleValue.class, ExampleValue2.class );
+
+        EntityTestAssembler testAss = new EntityTestAssembler();
+        testAss.assemble( module );
+
+        RdfNativeSesameStoreAssembler rdfAssembler = new RdfNativeSesameStoreAssembler();
+        rdfAssembler.assemble( module );
+    }
+
+    @Test
+    public void simpleContainsSuccessTest() throws Exception
+    {
+        ExampleEntity result = this.performContainsStringTest(
+            new HashSet<>( Arrays.asList(
+                ContainsAllTest.TEST_STRING_1, ContainsAllTest.TEST_STRING_2, ContainsAllTest.TEST_STRING_3
+            ) ),
             ContainsAllTest.TEST_STRING_3
-            );
-
-      Assert.assertTrue("The entity must have been found", result != null);
-   }
-
-   @Test
-   public void simpleContainsSuccessFailTest() throws Exception
-   {
-      ExampleEntity result = this.performContainsStringTest(
-            new HashSet<String>(Arrays.asList(
-                  ContainsAllTest.TEST_STRING_1, ContainsAllTest.TEST_STRING_2, ContainsAllTest.TEST_STRING_3
-                  )),
+        );
+
+        Assert.assertTrue( "The entity must have been found", result != null );
+    }
+
+    @Test
+    public void simpleContainsSuccessFailTest() throws Exception
+    {
+        ExampleEntity result = this.performContainsStringTest(
+            new HashSet<>( Arrays.asList(
+                ContainsAllTest.TEST_STRING_1, ContainsAllTest.TEST_STRING_2, ContainsAllTest.TEST_STRING_3
+            ) ),
             ContainsAllTest.TEST_STRING_4
-            );
-
-      Assert.assertTrue("The entity must not have been found", result == null);
-   }
-
-   @Test(expected = IllegalArgumentException.class)
-   public void simplecontainsNullTest() throws Exception
-   {
-      this.performContainsStringTest(
-            new HashSet<String>(Arrays.asList(
-                  ContainsAllTest.TEST_STRING_1, ContainsAllTest.TEST_STRING_2, ContainsAllTest.TEST_STRING_3
-                  )),
+        );
+
+        Assert.assertTrue( "The entity must not have been found", result == null );
+    }
+
+    @Test( expected = IllegalArgumentException.class )
+    public void simplecontainsNullTest() throws Exception
+    {
+        this.performContainsStringTest(
+            new HashSet<>( Arrays.asList(
+                ContainsAllTest.TEST_STRING_1, ContainsAllTest.TEST_STRING_2, ContainsAllTest.TEST_STRING_3
+            ) ),
             null
-            );
-
-   }
-
-   @Test
-   public void simpleContainsStringValueSuccessTest() throws Exception
-   {
-      ExampleEntity result = this.performContainsStringValueTest(
-            new HashSet<String>(Arrays.asList(
-                  ContainsAllTest.TEST_STRING_1, ContainsAllTest.TEST_STRING_2, ContainsAllTest.TEST_STRING_3
-                  )),
+        );
+    }
+
+    @Test
+    public void simpleContainsStringValueSuccessTest() throws Exception
+    {
+        ExampleEntity result = this.performContainsStringValueTest(
+            new HashSet<>( Arrays.asList(
+                ContainsAllTest.TEST_STRING_1, ContainsAllTest.TEST_STRING_2, ContainsAllTest.TEST_STRING_3
+            ) ),
             ContainsAllTest.TEST_STRING_3
-            );
-
-      Assert.assertTrue("The entity must have been found", result != null);
-   }
-
-   @Test
-   public void simpleContainsStringValueFailTest() throws Exception
-   {
-      ExampleEntity result = this.performContainsStringTest(
-            new HashSet<String>(Arrays.asList(
-                  ContainsAllTest.TEST_STRING_1, ContainsAllTest.TEST_STRING_2, ContainsAllTest.TEST_STRING_3
-                  )),
+        );
+
+        Assert.assertTrue( "The entity must have been found", result != null );
+    }
+
+    @Test
+    public void simpleContainsStringValueFailTest() throws Exception
+    {
+        ExampleEntity result = this.performContainsStringTest(
+            new HashSet<>( Arrays.asList(
+                ContainsAllTest.TEST_STRING_1, ContainsAllTest.TEST_STRING_2, ContainsAllTest.TEST_STRING_3
+            ) ),
             ContainsAllTest.TEST_STRING_4
-            );
+        );
 
-      Assert.assertTrue("The entity must not have been found", result == null);
-   }
+        Assert.assertTrue( "The entity must not have been found", result == null );
+    }
 
-   private ExampleEntity findEntity(String string)
-   {
-      QueryBuilder<ExampleEntity> builder = this.queryBuilderFactory.newQueryBuilder(ExampleEntity.class);
+    private ExampleEntity findEntity( String string )
+    {
+        QueryBuilder<ExampleEntity> builder = this.queryBuilderFactory.newQueryBuilder( ExampleEntity.class );
 
-      builder = builder.where(QueryExpressions.contains(
-            QueryExpressions.templateFor(ExampleEntity.class).strings(),
+        builder = builder.where( QueryExpressions.contains(
+            QueryExpressions.templateFor( ExampleEntity.class ).strings(),
             string
-            )
-      );
-      return this.unitOfWorkFactory.currentUnitOfWork().newQuery( builder ).find();
-
-   }
-
-   private ExampleEntity findEntityBasedOnValueString(String valueString)
-   {
-      ValueBuilder<ExampleValue2> vBuilder = this.valueBuilderFactory.newValueBuilder(ExampleValue2.class);
-         vBuilder.prototype().stringProperty().set(valueString);
-
-         ValueBuilder<ExampleValue> vBuilder2 = this.valueBuilderFactory.newValueBuilder(ExampleValue.class);
-         vBuilder2.prototype().valueProperty().set(vBuilder.newInstance());
-
-      return this.createComplexQuery(vBuilder2.newInstance()).find();
-   }
-
-   private Query<ExampleEntity> createComplexQuery(ExampleValue value)
-   {
-      QueryBuilder<ExampleEntity> builder = this.queryBuilderFactory.newQueryBuilder(ExampleEntity.class);
-      builder = builder.where(QueryExpressions.contains(
-            QueryExpressions.templateFor(ExampleEntity.class).complexValue(),
+                                 )
+        );
+        return this.unitOfWorkFactory.currentUnitOfWork().newQuery( builder ).find();
+    }
+
+    private ExampleEntity findEntityBasedOnValueString( String valueString )
+    {
+        ValueBuilder<ExampleValue2> vBuilder = this.valueBuilderFactory.newValueBuilder( ExampleValue2.class );
+        vBuilder.prototype().stringProperty().set( valueString );
+
+        ValueBuilder<ExampleValue> vBuilder2 = this.valueBuilderFactory.newValueBuilder( ExampleValue.class );
+        vBuilder2.prototype().valueProperty().set( vBuilder.newInstance() );
+
+        return this.createComplexQuery( vBuilder2.newInstance() ).find();
+    }
+
+    private Query<ExampleEntity> createComplexQuery( ExampleValue value )
+    {
+        QueryBuilder<ExampleEntity> builder = this.queryBuilderFactory.newQueryBuilder( ExampleEntity.class );
+        builder = builder.where( QueryExpressions.contains(
+            QueryExpressions.templateFor( ExampleEntity.class ).complexValue(),
             value
-            )
-         );
-
-      return this.unitOfWorkFactory.currentUnitOfWork().newQuery( builder);
-   }
-
-   private ExampleEntity performContainsStringTest(Set<String> entityStrings, String queryableString) throws Exception
-   {
-      UnitOfWork creatingUOW = this.unitOfWorkFactory.newUnitOfWork();
-      String[] entityStringsArray = new String[entityStrings.size()];
-      ContainsAllTest.createEntityWithStrings(creatingUOW, this.valueBuilderFactory, entityStrings.toArray(entityStringsArray));
-      creatingUOW.complete();
-
-      UnitOfWork queryingUOW = this.unitOfWorkFactory.newUnitOfWork();
-      try
-      {
-         ExampleEntity entity = this.findEntity(queryableString);
-         return entity;
-      }
-      finally
-      {
-         queryingUOW.discard();
-      }
-   }
-
-   private ExampleEntity performContainsStringValueTest(Set<String> entityStrings, String queryableString) throws Exception
-   {
-      UnitOfWork creatingUOW = this.unitOfWorkFactory.newUnitOfWork();
-      String[] entityStringsArray = new String[entityStrings.size()];
-      ContainsAllTest.createEntityWithComplexValues(creatingUOW, this.valueBuilderFactory, entityStrings.toArray(entityStringsArray));
-      creatingUOW.complete();
-
-      UnitOfWork queryingUOW = this.unitOfWorkFactory.newUnitOfWork();
-      try
-      {
-         ExampleEntity entity = this.findEntityBasedOnValueString(queryableString);
-         return entity;
-      }
-      finally
-      {
-         queryingUOW.discard();
-      }
-   }
+                                 )
+        );
+
+        return this.unitOfWorkFactory.currentUnitOfWork().newQuery( builder );
+    }
+
+    private ExampleEntity performContainsStringTest( Set<String> entityStrings, String queryableString )
+        throws Exception
+    {
+        UnitOfWork creatingUOW = this.unitOfWorkFactory.newUnitOfWork();
+        String[] entityStringsArray = new String[ entityStrings.size() ];
+        ContainsAllTest.createEntityWithStrings( creatingUOW, this.valueBuilderFactory,
+                                                 entityStrings.toArray( entityStringsArray ) );
+        creatingUOW.complete();
+
+        UnitOfWork queryingUOW = this.unitOfWorkFactory.newUnitOfWork();
+        try
+        {
+            return this.findEntity( queryableString );
+        }
+        finally
+        {
+            queryingUOW.discard();
+        }
+    }
+
+    private ExampleEntity performContainsStringValueTest( Set<String> entityStrings, String queryableString )
+        throws Exception
+    {
+        UnitOfWork creatingUOW = this.unitOfWorkFactory.newUnitOfWork();
+        String[] entityStringsArray = new String[ entityStrings.size() ];
+        ContainsAllTest.createEntityWithComplexValues( creatingUOW, this.valueBuilderFactory,
+                                                       entityStrings.toArray( entityStringsArray ) );
+        creatingUOW.complete();
+
+        UnitOfWork queryingUOW = this.unitOfWorkFactory.newUnitOfWork();
+        try
+        {
+            return this.findEntityBasedOnValueString( queryableString );
+        }
+        finally
+        {
+            queryingUOW.discard();
+        }
+    }
 }

http://git-wip-us.apache.org/repos/asf/zest-java/blob/86b89c63/extensions/indexing-rdf/src/test/java/org/apache/zest/index/rdf/RDFPerformanceTest.java
----------------------------------------------------------------------
diff --git a/extensions/indexing-rdf/src/test/java/org/apache/zest/index/rdf/RDFPerformanceTest.java b/extensions/indexing-rdf/src/test/java/org/apache/zest/index/rdf/RDFPerformanceTest.java
index bfaa9ca..cbef4f0 100644
--- a/extensions/indexing-rdf/src/test/java/org/apache/zest/index/rdf/RDFPerformanceTest.java
+++ b/extensions/indexing-rdf/src/test/java/org/apache/zest/index/rdf/RDFPerformanceTest.java
@@ -24,7 +24,6 @@ package org.apache.zest.index.rdf;
  * JAVADOC
  */
 
-import java.io.File;
 import java.time.Duration;
 import java.time.Instant;
 import java.util.ArrayList;
@@ -49,19 +48,18 @@ import org.apache.zest.library.rdf.repository.NativeConfiguration;
 import org.apache.zest.spi.query.IndexExporter;
 import org.apache.zest.test.AbstractZestTest;
 import org.apache.zest.test.EntityTestAssembler;
-import org.apache.zest.test.util.DelTreeAfter;
 import org.junit.Ignore;
 import org.junit.Rule;
 import org.junit.Test;
+import org.junit.rules.TemporaryFolder;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 public class RDFPerformanceTest extends AbstractZestTest
 {
     private static final Logger LOG = LoggerFactory.getLogger( RDFPerformanceTest.class );
-    private static final File DATA_DIR = new File( "build/tmp/rdf-performance-test" );
     @Rule
-    public final DelTreeAfter delTreeAfter = new DelTreeAfter( DATA_DIR );
+    public final TemporaryFolder tmpDir = new TemporaryFolder();
 
     public interface ExampleEntity extends EntityComposite
     {
@@ -78,7 +76,7 @@ public class RDFPerformanceTest extends AbstractZestTest
         ModuleAssembly prefModule = module.layer().module( "PrefModule" );
         prefModule.entities( NativeConfiguration.class ).visibleIn( Visibility.application );
         prefModule.forMixin( NativeConfiguration.class ).declareDefaults().tripleIndexes().set( "spoc,cspo" );
-        prefModule.forMixin( NativeConfiguration.class ).declareDefaults().dataDirectory().set( DATA_DIR.getAbsolutePath() );
+        prefModule.forMixin( NativeConfiguration.class ).declareDefaults().dataDirectory().set( tmpDir.getRoot().getAbsolutePath() );
         new EntityTestAssembler().assemble( prefModule );
 
         module.entities( ExampleEntity.class );

http://git-wip-us.apache.org/repos/asf/zest-java/blob/86b89c63/extensions/indexing-rdf/src/test/java/org/apache/zest/index/rdf/RdfQueryMultimoduleTest.java
----------------------------------------------------------------------
diff --git a/extensions/indexing-rdf/src/test/java/org/apache/zest/index/rdf/RdfQueryMultimoduleTest.java b/extensions/indexing-rdf/src/test/java/org/apache/zest/index/rdf/RdfQueryMultimoduleTest.java
index ea5e10d..ebb4135 100644
--- a/extensions/indexing-rdf/src/test/java/org/apache/zest/index/rdf/RdfQueryMultimoduleTest.java
+++ b/extensions/indexing-rdf/src/test/java/org/apache/zest/index/rdf/RdfQueryMultimoduleTest.java
@@ -20,7 +20,6 @@
 
 package org.apache.zest.index.rdf;
 
-import java.io.File;
 import org.apache.zest.api.common.Visibility;
 import org.apache.zest.bootstrap.AssemblyException;
 import org.apache.zest.bootstrap.LayerAssembly;
@@ -29,15 +28,14 @@ import org.apache.zest.bootstrap.unitofwork.DefaultUnitOfWorkAssembler;
 import org.apache.zest.index.rdf.assembly.RdfNativeSesameStoreAssembler;
 import org.apache.zest.library.rdf.repository.NativeConfiguration;
 import org.apache.zest.test.EntityTestAssembler;
-import org.apache.zest.test.util.DelTreeAfter;
 import org.junit.Rule;
+import org.junit.rules.TemporaryFolder;
 
 public class RdfQueryMultimoduleTest
     extends RdfQueryTest
 {
-    private static final File DATA_DIR = new File( "build/tmp/rdf-query-test" );
     @Rule
-    public final DelTreeAfter delTreeAfter = new DelTreeAfter( DATA_DIR );
+    public final TemporaryFolder tmpDir = new TemporaryFolder();
 
     @Override
     public void assemble( ModuleAssembly module )
@@ -60,7 +58,8 @@ public class RdfQueryMultimoduleTest
         module.layer().uses( configLayer );
         ModuleAssembly config = configLayer.module( "config" );
         config.entities( NativeConfiguration.class ).visibleIn( Visibility.application );
-        config.forMixin( NativeConfiguration.class ).declareDefaults().dataDirectory().set( DATA_DIR.getAbsolutePath() );
+        config.forMixin( NativeConfiguration.class ).declareDefaults()
+              .dataDirectory().set( tmpDir.getRoot().getAbsolutePath() );
         new EntityTestAssembler().assemble( config );
         new DefaultUnitOfWorkAssembler().assemble( config );
     }

http://git-wip-us.apache.org/repos/asf/zest-java/blob/86b89c63/extensions/indexing-rdf/src/test/java/org/apache/zest/index/rdf/RdfQueryTest.java
----------------------------------------------------------------------
diff --git a/extensions/indexing-rdf/src/test/java/org/apache/zest/index/rdf/RdfQueryTest.java b/extensions/indexing-rdf/src/test/java/org/apache/zest/index/rdf/RdfQueryTest.java
index 79cdc6c..7c6971c 100644
--- a/extensions/indexing-rdf/src/test/java/org/apache/zest/index/rdf/RdfQueryTest.java
+++ b/extensions/indexing-rdf/src/test/java/org/apache/zest/index/rdf/RdfQueryTest.java
@@ -19,7 +19,6 @@
  */
 package org.apache.zest.index.rdf;
 
-import java.io.File;
 import org.apache.zest.api.common.Visibility;
 import org.apache.zest.bootstrap.AssemblyException;
 import org.apache.zest.bootstrap.ModuleAssembly;
@@ -29,18 +28,17 @@ import org.apache.zest.library.rdf.repository.NativeConfiguration;
 import org.apache.zest.spi.query.EntityFinderException;
 import org.apache.zest.test.EntityTestAssembler;
 import org.apache.zest.test.indexing.AbstractQueryTest;
-import org.apache.zest.test.util.DelTreeAfter;
 import org.junit.Ignore;
 import org.junit.Rule;
 import org.junit.Test;
+import org.junit.rules.TemporaryFolder;
 
 public class RdfQueryTest
     extends AbstractQueryTest
 {
 
-    private static final File DATA_DIR = new File( "build/tmp/rdf-query-test" );
     @Rule
-    public final DelTreeAfter delTreeAfter = new DelTreeAfter( DATA_DIR );
+    public final TemporaryFolder tmpDir = new TemporaryFolder();
 
     @Override
     public void assemble( ModuleAssembly module )
@@ -51,7 +49,8 @@ public class RdfQueryTest
 
         ModuleAssembly config = module.layer().module( "Config" );
         config.entities( NativeConfiguration.class ).visibleIn( Visibility.layer );
-        config.forMixin( NativeConfiguration.class ).declareDefaults().dataDirectory().set( DATA_DIR.getAbsolutePath() );
+        config.forMixin( NativeConfiguration.class ).declareDefaults()
+              .dataDirectory().set( tmpDir.getRoot().getAbsolutePath() );
         new EntityTestAssembler().assemble( config );
         new DefaultUnitOfWorkAssembler().assemble( config );
     }

http://git-wip-us.apache.org/repos/asf/zest-java/blob/86b89c63/extensions/indexing-rdf/src/test/java/org/apache/zest/index/rdf/qi95/Qi95IssueTest.java
----------------------------------------------------------------------
diff --git a/extensions/indexing-rdf/src/test/java/org/apache/zest/index/rdf/qi95/Qi95IssueTest.java b/extensions/indexing-rdf/src/test/java/org/apache/zest/index/rdf/qi95/Qi95IssueTest.java
index 8b1e5db..3b50c25 100644
--- a/extensions/indexing-rdf/src/test/java/org/apache/zest/index/rdf/qi95/Qi95IssueTest.java
+++ b/extensions/indexing-rdf/src/test/java/org/apache/zest/index/rdf/qi95/Qi95IssueTest.java
@@ -43,17 +43,16 @@ import org.apache.zest.index.rdf.assembly.RdfMemoryStoreAssembler;
 import org.apache.zest.index.rdf.assembly.RdfNativeSesameStoreAssembler;
 import org.apache.zest.library.rdf.repository.NativeConfiguration;
 import org.apache.zest.test.EntityTestAssembler;
-import org.apache.zest.test.util.DelTreeAfter;
 import org.apache.zest.valueserialization.orgjson.OrgJsonValueSerializationAssembler;
+import org.junit.rules.TemporaryFolder;
 
 import static org.junit.Assert.assertTrue;
 
 public class Qi95IssueTest
 {
 
-    private static final File DATA_DIR = new File( "build/tmp/qi95-issue-test" );
     @Rule
-    public final DelTreeAfter delTreeAfter = new DelTreeAfter( DATA_DIR );
+    public final TemporaryFolder tmpDir = new TemporaryFolder();
 
     @Test
     public void canCreateAndQueryWithNativeRdfAndJdbm()
@@ -351,7 +350,7 @@ public class Qi95IssueTest
 
     private File createTempDirectory( String name )
     {
-        File t = new File( DATA_DIR, name );
+        File t = new File( tmpDir.getRoot(), name );
         t.mkdirs();
         return t;
     }

http://git-wip-us.apache.org/repos/asf/zest-java/blob/86b89c63/extensions/indexing-solr/src/test/java/org/apache/zest/index/solr/SolrEntityFinderTest.java
----------------------------------------------------------------------
diff --git a/extensions/indexing-solr/src/test/java/org/apache/zest/index/solr/SolrEntityFinderTest.java b/extensions/indexing-solr/src/test/java/org/apache/zest/index/solr/SolrEntityFinderTest.java
index f79dc14..a9da8f7 100644
--- a/extensions/indexing-solr/src/test/java/org/apache/zest/index/solr/SolrEntityFinderTest.java
+++ b/extensions/indexing-solr/src/test/java/org/apache/zest/index/solr/SolrEntityFinderTest.java
@@ -19,35 +19,29 @@
  */
 package org.apache.zest.index.solr;
 
-import java.io.File;
-import org.junit.Ignore;
-import org.junit.Rule;
 import org.apache.zest.bootstrap.AssemblyException;
 import org.apache.zest.bootstrap.ModuleAssembly;
 import org.apache.zest.library.fileconfig.FileConfigurationOverride;
 import org.apache.zest.library.fileconfig.FileConfigurationService;
 import org.apache.zest.test.indexing.AbstractEntityFinderTest;
-import org.apache.zest.test.util.DelTreeAfter;
+import org.junit.Ignore;
+import org.junit.Rule;
+import org.junit.rules.TemporaryFolder;
 
 @Ignore( "SOLR Index/Query is not working at all" )
 public class SolrEntityFinderTest
     extends AbstractEntityFinderTest
 {
-
-    private static final File DATA_DIR = new File( "build/tmp/solr-named-query-test" );
     @Rule
-    public final DelTreeAfter delTreeAfter = new DelTreeAfter( DATA_DIR );
+    public final TemporaryFolder tmpDir = new TemporaryFolder();
 
     @Override
     public void assemble( ModuleAssembly module )
         throws AssemblyException
     {
         super.assemble( module );
-        FileConfigurationOverride override = new FileConfigurationOverride().withData( new File( DATA_DIR, "zest-data" ) ).
-            withLog( new File( DATA_DIR, "zest-logs" ) ).withTemporary( new File( DATA_DIR, "zest-temp" ) );
-        module.services( FileConfigurationService.class ).
-            setMetaInfo( override );
+        module.services( FileConfigurationService.class )
+              .setMetaInfo( new FileConfigurationOverride().withConventionalRoot( tmpDir.getRoot() ) );
         new SolrAssembler().assemble( module );
     }
-
 }

http://git-wip-us.apache.org/repos/asf/zest-java/blob/86b89c63/extensions/indexing-solr/src/test/java/org/apache/zest/index/solr/SolrNamedQueryTest.java
----------------------------------------------------------------------
diff --git a/extensions/indexing-solr/src/test/java/org/apache/zest/index/solr/SolrNamedQueryTest.java b/extensions/indexing-solr/src/test/java/org/apache/zest/index/solr/SolrNamedQueryTest.java
index 0301951..cee04c1 100644
--- a/extensions/indexing-solr/src/test/java/org/apache/zest/index/solr/SolrNamedQueryTest.java
+++ b/extensions/indexing-solr/src/test/java/org/apache/zest/index/solr/SolrNamedQueryTest.java
@@ -19,45 +19,38 @@
  */
 package org.apache.zest.index.solr;
 
-import java.io.File;
 import java.util.function.Predicate;
-import org.junit.Ignore;
-import org.junit.Rule;
 import org.apache.zest.api.composite.Composite;
 import org.apache.zest.bootstrap.AssemblyException;
 import org.apache.zest.bootstrap.ModuleAssembly;
 import org.apache.zest.library.fileconfig.FileConfigurationOverride;
 import org.apache.zest.library.fileconfig.FileConfigurationService;
 import org.apache.zest.test.indexing.AbstractNamedQueryTest;
-import org.apache.zest.test.util.DelTreeAfter;
+import org.junit.Ignore;
+import org.junit.Rule;
+import org.junit.rules.TemporaryFolder;
 
 @Ignore( "SOLR Index/Query is not working at all" )
 public class SolrNamedQueryTest
     extends AbstractNamedQueryTest
 {
-
-    private static final File DATA_DIR = new File( "build/tmp/solr-named-query-test" );
     @Rule
-    public final DelTreeAfter delTreeAfter = new DelTreeAfter( DATA_DIR );
+    public final TemporaryFolder tmpDir = new TemporaryFolder();
 
     @Override
     public void assemble( ModuleAssembly module )
         throws AssemblyException
     {
         super.assemble( module );
-        FileConfigurationOverride override = new FileConfigurationOverride().withData( new File( DATA_DIR, "zest-data" ) ).
-            withLog( new File( DATA_DIR, "zest-logs" ) ).withTemporary( new File( DATA_DIR, "zest-temp" ) );
-        module.services( FileConfigurationService.class ).
-            setMetaInfo( override );
+        module.services( FileConfigurationService.class )
+              .setMetaInfo( new FileConfigurationOverride().withConventionalRoot( tmpDir.getRoot() ) );
         new SolrAssembler().assemble( module );
     }
 
     @Override
     protected String[] queryStrings()
     {
-        return new String[]
-        {
-        }; // TODO Write example Solr named queries
+        return new String[] {}; // TODO Write example Solr named queries
     }
 
     @Override
@@ -65,5 +58,4 @@ public class SolrNamedQueryTest
     {
         return SolrExpressions.search( queryString );
     }
-
 }

http://git-wip-us.apache.org/repos/asf/zest-java/blob/86b89c63/extensions/indexing-solr/src/test/java/org/apache/zest/index/solr/SolrQueryServiceTest.java
----------------------------------------------------------------------
diff --git a/extensions/indexing-solr/src/test/java/org/apache/zest/index/solr/SolrQueryServiceTest.java b/extensions/indexing-solr/src/test/java/org/apache/zest/index/solr/SolrQueryServiceTest.java
index 4d59f9c..6b32c80 100644
--- a/extensions/indexing-solr/src/test/java/org/apache/zest/index/solr/SolrQueryServiceTest.java
+++ b/extensions/indexing-solr/src/test/java/org/apache/zest/index/solr/SolrQueryServiceTest.java
@@ -19,13 +19,11 @@
  */
 package org.apache.zest.index.solr;
 
-import java.io.File;
+import java.util.ArrayList;
+import java.util.List;
 import org.apache.solr.client.solrj.SolrServerException;
 import org.apache.solr.common.SolrDocument;
 import org.apache.solr.common.SolrDocumentList;
-import org.junit.Assert;
-import org.junit.Before;
-import org.junit.Test;
 import org.apache.zest.api.common.UseDefaults;
 import org.apache.zest.api.entity.EntityComposite;
 import org.apache.zest.api.property.Property;
@@ -35,25 +33,23 @@ import org.apache.zest.api.unitofwork.UnitOfWork;
 import org.apache.zest.api.unitofwork.UnitOfWorkCompletionException;
 import org.apache.zest.bootstrap.AssemblyException;
 import org.apache.zest.bootstrap.ModuleAssembly;
+import org.apache.zest.library.fileconfig.FileConfigurationOverride;
 import org.apache.zest.library.fileconfig.FileConfigurationService;
 import org.apache.zest.test.AbstractZestTest;
 import org.apache.zest.test.EntityTestAssembler;
-
-import java.util.ArrayList;
-import java.util.List;
+import org.junit.Assert;
+import org.junit.Before;
 import org.junit.Rule;
-import org.apache.zest.library.fileconfig.FileConfigurationOverride;
-import org.apache.zest.test.util.DelTreeAfter;
+import org.junit.Test;
+import org.junit.rules.TemporaryFolder;
 
 import static org.hamcrest.CoreMatchers.equalTo;
 
 public class SolrQueryServiceTest
     extends AbstractZestTest
 {
-
-    private static final File DATA_DIR = new File( "build/tmp/solr-query-service-test" );
     @Rule
-    public final DelTreeAfter delTreeAfter = new DelTreeAfter( DATA_DIR );
+    public final TemporaryFolder tmpDir = new TemporaryFolder();
 
     @Override
     public void assemble( ModuleAssembly module )
@@ -61,10 +57,8 @@ public class SolrQueryServiceTest
     {
         module.layer().application().setMode( Application.Mode.test );
 
-        FileConfigurationOverride override = new FileConfigurationOverride().withData( new File( DATA_DIR, "zest-data" ) ).
-            withLog( new File( DATA_DIR, "zest-logs" ) ).withTemporary( new File( DATA_DIR, "zest-temp" ) );
-        module.services( FileConfigurationService.class ).
-            setMetaInfo( override );
+        module.services( FileConfigurationService.class )
+              .setMetaInfo( new FileConfigurationOverride().withConventionalRoot( tmpDir.getRoot() ) );
 
         new EntityTestAssembler().assemble( module );
         // START SNIPPET: assembly
@@ -94,7 +88,7 @@ public class SolrQueryServiceTest
         try( UnitOfWork uow = unitOfWorkFactory.newUnitOfWork() )
         {
             Query<TestEntity> query = uow.newQuery( queryBuilderFactory.newQueryBuilder( TestEntity.class )
-                                                        .where( SolrExpressions.search( "hello" ) ) );
+                                                                       .where( SolrExpressions.search( "hello" ) ) );
 
             TestEntity test = query.find();
             Assert.assertThat( test.name().get(), equalTo( "Hello World" ) );
@@ -125,7 +119,5 @@ public class SolrQueryServiceTest
 
         @UseDefaults
         Property<String> name();
-
     }
-
 }

http://git-wip-us.apache.org/repos/asf/zest-java/blob/86b89c63/extensions/indexing-solr/src/test/java/org/apache/zest/index/solr/SolrQueryTest.java
----------------------------------------------------------------------
diff --git a/extensions/indexing-solr/src/test/java/org/apache/zest/index/solr/SolrQueryTest.java b/extensions/indexing-solr/src/test/java/org/apache/zest/index/solr/SolrQueryTest.java
index a404585..14ffd25 100644
--- a/extensions/indexing-solr/src/test/java/org/apache/zest/index/solr/SolrQueryTest.java
+++ b/extensions/indexing-solr/src/test/java/org/apache/zest/index/solr/SolrQueryTest.java
@@ -19,35 +19,29 @@
  */
 package org.apache.zest.index.solr;
 
-import java.io.File;
-import org.junit.Ignore;
-import org.junit.Rule;
 import org.apache.zest.bootstrap.AssemblyException;
 import org.apache.zest.bootstrap.ModuleAssembly;
 import org.apache.zest.library.fileconfig.FileConfigurationOverride;
 import org.apache.zest.library.fileconfig.FileConfigurationService;
 import org.apache.zest.test.indexing.AbstractQueryTest;
-import org.apache.zest.test.util.DelTreeAfter;
+import org.junit.Ignore;
+import org.junit.Rule;
+import org.junit.rules.TemporaryFolder;
 
 @Ignore( "SOLR Index/Query is not working at all" )
 public class SolrQueryTest
     extends AbstractQueryTest
 {
-
-    private static final File DATA_DIR = new File( "build/tmp/solr-query-test" );
     @Rule
-    public final DelTreeAfter delTreeAfter = new DelTreeAfter( DATA_DIR );
+    public final TemporaryFolder tmpDir = new TemporaryFolder();
 
     @Override
     public void assemble( ModuleAssembly module )
         throws AssemblyException
     {
         super.assemble( module );
-        FileConfigurationOverride override = new FileConfigurationOverride().withData( new File( DATA_DIR, "zest-data" ) ).
-            withLog( new File( DATA_DIR, "zest-logs" ) ).withTemporary( new File( DATA_DIR, "zest-temp" ) );
-        module.services( FileConfigurationService.class ).
-            setMetaInfo( override );
+        module.services( FileConfigurationService.class )
+              .setMetaInfo( new FileConfigurationOverride().withConventionalRoot( tmpDir.getRoot() ) );
         new SolrAssembler().assemble( module );
     }
-
 }


Mime
View raw message