polygene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nic...@apache.org
Subject [8/9] polygene-java git commit: Merging in 'develop'
Date Sat, 27 May 2017 02:12:03 GMT
Merging in 'develop'

Signed-off-by: niclas <niclas@hedhman.org>


Project: http://git-wip-us.apache.org/repos/asf/polygene-java/repo
Commit: http://git-wip-us.apache.org/repos/asf/polygene-java/commit/32b29f99
Tree: http://git-wip-us.apache.org/repos/asf/polygene-java/tree/32b29f99
Diff: http://git-wip-us.apache.org/repos/asf/polygene-java/diff/32b29f99

Branch: refs/heads/yeoman-work
Commit: 32b29f99177d7bb61a73d317ce1b5b1e88ddf4e7
Parents: 8721a02 4a7611c
Author: niclas <niclas@hedhman.org>
Authored: Fri May 26 14:56:08 2017 +0800
Committer: niclas <niclas@hedhman.org>
Committed: Fri May 26 14:56:08 2017 +0800

----------------------------------------------------------------------
 .../entitystore/geode/GeodeConfiguration.java   |  81 ----
 .../geode/GeodeEntityStoreConfiguration.java    |  81 ++++
 .../geode/GeodeEntityStoreMixin.java            |  10 +-
 .../assembly/GeodeEntityStoreAssembler.java     |   4 +-
 .../hazelcast/HazelcastConfiguration.java       |  39 --
 .../HazelcastEntityStoreConfiguration.java      |  39 ++
 .../hazelcast/HazelcastEntityStoreMixin.java    |   6 +-
 .../assembly/HazelcastEntityStoreAssembler.java |   4 +-
 .../JCloudsEntityStoreConfiguration.java        |  54 +++
 .../jclouds/JCloudsEntityStoreMixin.java        | 284 ++++++++++++++
 .../jclouds/JCloudsEntityStoreService.java      |  48 +++
 .../JCloudsMapEntityStoreConfiguration.java     |  54 ---
 .../jclouds/JCloudsMapEntityStoreMixin.java     | 284 --------------
 .../jclouds/JCloudsMapEntityStoreService.java   |  48 ---
 .../assembly/JCloudsEntityStoreAssembler.java   |   8 +-
 .../jclouds/JCloudsFilesystemTest.java          |   4 +-
 .../entitystore/jdbm/JdbmConfiguration.java     |  52 ---
 .../jdbm/JdbmEntityStoreConfiguration.java      |  52 +++
 .../entitystore/jdbm/JdbmEntityStoreMixin.java  |   4 +-
 .../jdbm/JdbmEntityStoreService.java            |   8 +-
 .../jdbm/assembly/JdbmEntityStoreAssembler.java |   4 +-
 .../entitystore/mongodb/MongoAccessors.java     |  32 --
 .../entitystore/mongodb/MongoDBAccessors.java   |  32 ++
 .../mongodb/MongoDBEntityStoreMixin.java        | 322 ++++++++++++++++
 .../mongodb/MongoDBEntityStoreService.java      |  49 +++
 .../mongodb/MongoMapEntityStoreMixin.java       | 322 ----------------
 .../mongodb/MongoMapEntityStoreService.java     |  49 ---
 .../assembly/MongoDBEntityStoreAssembler.java   |   4 +-
 .../mongodb/EmbedMongoDBMapEntityStoreTest.java |  88 +++++
 .../mongodb/EmbedMongoMapEntityStoreTest.java   |  88 -----
 .../mongodb/MongoDBEntityStoreTest.java         |  88 +++++
 .../MongoDBEntityStoreWithCacheTest.java        |  84 ++++
 .../mongodb/MongoMapEntityStoreTest.java        |  88 -----
 .../MongoMapEntityStoreWithCacheTest.java       |  84 ----
 .../redis/RedisEntityStoreConfiguration.java    |   2 +-
 .../redis/RedisEntityStoreMixin.java            | 177 +++++++++
 .../redis/RedisEntityStoreService.java          |  49 +++
 .../redis/RedisMapEntityStoreMixin.java         | 177 ---------
 .../redis/RedisMapEntityStoreService.java       |  49 ---
 .../assembly/RedisEntityStoreAssembler.java     |   4 +-
 .../entitystore/redis/RedisEntityStoreTest.java |  80 ++++
 .../redis/RedisEntityStoreWithCacheTest.java    |  74 ++++
 .../redis/RedisMapEntityStoreTest.java          |  80 ----
 .../redis/RedisMapEntityStoreWithCacheTest.java |  74 ----
 .../entitystore/riak/RiakEntityStoreMixin.java  | 384 +++++++++++++++++++
 .../riak/RiakEntityStoreService.java            |  53 +++
 .../riak/RiakMapEntityStoreMixin.java           | 384 -------------------
 .../riak/RiakMapEntityStoreService.java         |  53 ---
 .../riak/assembly/RiakEntityStoreAssembler.java |   8 +-
 .../entitystore/riak/RiakEntityStoreTest.java   |  71 ++++
 .../riak/RiakEntityStoreWithCacheTest.java      |  69 ++++
 .../riak/RiakMapEntityStoreTest.java            |  71 ----
 .../riak/RiakMapEntityStoreWithCacheTest.java   |  69 ----
 .../sql/SQLEntityStoreConfiguration.java        |  47 +++
 .../entitystore/sql/SQLEntityStoreMixin.java    | 244 ++++++++++++
 .../entitystore/sql/SQLEntityStoreService.java  |  43 +++
 .../sql/SQLMapEntityStoreConfiguration.java     |  47 ---
 .../entitystore/sql/SQLMapEntityStoreMixin.java | 244 ------------
 .../sql/SQLMapEntityStoreService.java           |  43 ---
 .../AbstractSQLEntityStoreAssembler.java        |  97 +++++
 .../AbstractSQLMapEntityStoreAssembler.java     |  97 -----
 .../assembly/DerbySQLEntityStoreAssembler.java  |   2 +-
 .../sql/assembly/H2SQLEntityStoreAssembler.java |   2 +-
 .../sql/assembly/MySQLEntityStoreAssembler.java |   2 +-
 .../PostgreSQLEntityStoreAssembler.java         |   2 +-
 .../assembly/SQLiteEntityStoreAssembler.java    |   2 +-
 .../sql/DerbySQLEntityStoreTest.java            |   4 +-
 .../entitystore/sql/MySQLEntityStoreTest.java   |   4 +-
 .../ElasticSearchClusterConfiguration.java      |   2 +-
 .../ElasticSearchConfiguration.java             |  50 ---
 .../ElasticSearchIndexException.java            |  36 --
 .../ElasticSearchIndexExporter.java             |   5 +-
 .../elasticsearch/ElasticSearchIndexer.java     |   2 +-
 .../ElasticSearchIndexingConfiguration.java     |  49 +++
 .../ElasticSearchIndexingException.java         |  35 ++
 .../elasticsearch/ElasticSearchSupport.java     |   5 +-
 .../assembly/ESClientIndexQueryAssembler.java   |   4 +-
 .../ESFilesystemIndexQueryAssembler.java        |   4 +-
 .../elasticsearch/client/ESClientSupport.java   |   6 +-
 .../filesystem/ESFilesystemSupport.java         |   6 +-
 .../ElasticSearchComplexQueryTest.java          |   2 +-
 .../elasticsearch/ElasticSearchFinderTest.java  |   2 +-
 .../ElasticSearchQueryMultimoduleTest.java      |   2 +-
 .../elasticsearch/ElasticSearchQueryTest.java   |   2 +-
 .../index/elasticsearch/ElasticSearchTest.java  |   2 +-
 .../index/elasticsearch/ImmenseTermTest.java    |   2 +-
 .../index/rdf/RdfIndexingEngineService.java     |  30 --
 .../polygene/index/rdf/RdfIndexingService.java  |  30 ++
 .../rdf/assembly/RdfMemoryStoreAssembler.java   |   4 +-
 .../assembly/RdfNativeSesameStoreAssembler.java |   4 +-
 .../assembly/RdfRdbmsSesameStoreAssembler.java  |   4 +-
 .../index/rdf/indexing/RdfExporter.java         | 106 -----
 .../index/rdf/indexing/RdfIndexExporter.java    |  92 +++++
 .../index/rdf/indexing/RdfIndexerService.java   | 239 ++++++++++++
 .../index/rdf/indexing/RdfIndexingService.java  | 240 ------------
 .../polygene/index/rdf/RdfComplexQueryTest.java |   2 +-
 .../polygene/index/rdf/RdfEntityFinderTest.java |   2 +-
 .../polygene/index/rdf/qi95/Qi95IssueTest.java  |   6 +-
 .../polygene/index/solr/SolrQueryService.java   |   3 +-
 .../index/sql/SQLIndexingConfiguration.java     |  31 ++
 .../sql/SQLIndexingEngineConfiguration.java     |  31 --
 .../index/sql/SQLIndexingEngineService.java     |  44 ---
 .../polygene/index/sql/SQLIndexingService.java  |  44 +++
 .../AbstractSQLIndexQueryAssembler.java         |   7 +-
 .../assembly/PostgreSQLIndexQueryAssembler.java |   4 +-
 .../support/postgresql/PostgreSQLService.java   |   4 +-
 .../codahale/CodahaleMetricsProvider.java       |   3 +-
 .../polygene/index/reindexer/ReindexerTest.java |   6 +-
 .../library/rest/admin/IndexResource.java       |  10 +-
 .../library/rest/admin/DomainAssembler.java     |   4 +-
 .../jdbm/JdbmEntityStorePerformanceTest.java    |   4 +-
 .../sql/DerbySQLEntityStorePerformanceTest.java |   6 +-
 .../indexing/rdf/QueryPerformanceTest.java      |   4 +-
 .../persistence/PersistenceAssembler.java       |   4 +-
 114 files changed, 3236 insertions(+), 3254 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/polygene-java/blob/32b29f99/extensions/entitystore-mongodb/src/test/java/org/apache/polygene/entitystore/mongodb/MongoDBEntityStoreTest.java
----------------------------------------------------------------------
diff --cc extensions/entitystore-mongodb/src/test/java/org/apache/polygene/entitystore/mongodb/MongoDBEntityStoreTest.java
index 0000000,131e76e..eeeca64
mode 000000,100644..100644
--- a/extensions/entitystore-mongodb/src/test/java/org/apache/polygene/entitystore/mongodb/MongoDBEntityStoreTest.java
+++ b/extensions/entitystore-mongodb/src/test/java/org/apache/polygene/entitystore/mongodb/MongoDBEntityStoreTest.java
@@@ -1,0 -1,88 +1,88 @@@
+ /*
+  *  Licensed to the Apache Software Foundation (ASF) under one
+  *  or more contributor license agreements.  See the NOTICE file
+  *  distributed with this work for additional information
+  *  regarding copyright ownership.  The ASF licenses this file
+  *  to you under the Apache License, Version 2.0 (the
+  *  "License"); you may not use this file except in compliance
+  *  with the License.  You may obtain a copy of the License at
+  *
+  *       http://www.apache.org/licenses/LICENSE-2.0
+  *
+  *  Unless required by applicable law or agreed to in writing, software
+  *  distributed under the License is distributed on an "AS IS" BASIS,
+  *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  *  See the License for the specific language governing permissions and
+  *  limitations under the License.
+  *
+  *
+  */
+ package org.apache.polygene.entitystore.mongodb;
+ 
+ import com.mongodb.Mongo;
+ import org.apache.polygene.api.common.Visibility;
+ import org.apache.polygene.bootstrap.AssemblyException;
+ import org.apache.polygene.bootstrap.ModuleAssembly;
+ import org.apache.polygene.entitystore.mongodb.assembly.MongoDBEntityStoreAssembler;
+ import org.apache.polygene.test.EntityTestAssembler;
+ import org.apache.polygene.test.entity.AbstractEntityStoreTest;
+ import org.junit.BeforeClass;
+ 
+ import static org.apache.polygene.test.util.Assume.assumeConnectivity;
+ 
+ /**
+  * Test the MongoDBEntityStoreService.
+  * <p>Installing mongodb and starting it should suffice as the test use mongodb defaults:
127.0.0.1:27017</p>
+  */
+ public class MongoDBEntityStoreTest extends AbstractEntityStoreTest
+ {
+     @BeforeClass
 -    public static void beforeRedisMapEntityStoreTests()
++    public static void beforeMongoMapEntityStoreTests()
+     {
+         assumeConnectivity( "localhost", 27017 );
+     }
+ 
+     @Override
+     // START SNIPPET: assembly
+     public void assemble( ModuleAssembly module )
+         throws AssemblyException
+     {
+         // END SNIPPET: assembly
+         super.assemble( module );
+ 
+         ModuleAssembly config = module.layer().module( "config" );
+         new EntityTestAssembler().assemble( config );
+ 
+         // START SNIPPET: assembly
+         new MongoDBEntityStoreAssembler().withConfig( config, Visibility.layer ).assemble(
module );
+         // END SNIPPET: assembly
+ 
+         MongoDBEntityStoreConfiguration mongoConfig = config.forMixin( MongoDBEntityStoreConfiguration.class
).declareDefaults();
+         mongoConfig.writeConcern().set( MongoDBEntityStoreConfiguration.WriteConcern.MAJORITY
);
+         mongoConfig.database().set( "polygene:test" );
+         mongoConfig.collection().set( "polygene:test:entities" );
+         // START SNIPPET: assembly
+     }
+ 
+     // END SNIPPET: assembly
+     private Mongo mongo;
+     private String dbName;
+ 
+     @Override
+     public void setUp()
+         throws Exception
+     {
+         super.setUp();
+         MongoDBEntityStoreService es = serviceFinder.findService( MongoDBEntityStoreService.class
).get();
+         mongo = es.mongoInstanceUsed();
+         dbName = es.dbInstanceUsed().getName();
+     }
+ 
+     @Override
+     public void tearDown()
+         throws Exception
+     {
+         mongo.dropDatabase( dbName );
+         super.tearDown();
+     }
+ }

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/32b29f99/extensions/entitystore-redis/src/test/java/org/apache/polygene/entitystore/redis/RedisEntityStoreTest.java
----------------------------------------------------------------------
diff --cc extensions/entitystore-redis/src/test/java/org/apache/polygene/entitystore/redis/RedisEntityStoreTest.java
index 0000000,671bffa..f980e59
mode 000000,100644..100644
--- a/extensions/entitystore-redis/src/test/java/org/apache/polygene/entitystore/redis/RedisEntityStoreTest.java
+++ b/extensions/entitystore-redis/src/test/java/org/apache/polygene/entitystore/redis/RedisEntityStoreTest.java
@@@ -1,0 -1,80 +1,80 @@@
+ /*
+  *  Licensed to the Apache Software Foundation (ASF) under one
+  *  or more contributor license agreements.  See the NOTICE file
+  *  distributed with this work for additional information
+  *  regarding copyright ownership.  The ASF licenses this file
+  *  to you under the Apache License, Version 2.0 (the
+  *  "License"); you may not use this file except in compliance
+  *  with the License.  You may obtain a copy of the License at
+  *
+  *       http://www.apache.org/licenses/LICENSE-2.0
+  *
+  *  Unless required by applicable law or agreed to in writing, software
+  *  distributed under the License is distributed on an "AS IS" BASIS,
+  *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  *  See the License for the specific language governing permissions and
+  *  limitations under the License.
+  *
+  *
+  */
+ package org.apache.polygene.entitystore.redis;
+ 
+ import org.apache.polygene.api.common.Visibility;
+ import org.apache.polygene.bootstrap.AssemblyException;
+ import org.apache.polygene.bootstrap.ModuleAssembly;
+ import org.apache.polygene.entitystore.redis.assembly.RedisEntityStoreAssembler;
+ import org.apache.polygene.test.EntityTestAssembler;
++import org.apache.polygene.test.docker.DockerRule;
+ import org.apache.polygene.test.entity.AbstractEntityStoreTest;
 -import org.apache.polygene.test.internal.DockerRule;
+ import org.junit.ClassRule;
+ import redis.clients.jedis.Jedis;
+ import redis.clients.jedis.JedisPool;
+ 
+ public class RedisEntityStoreTest
+     extends AbstractEntityStoreTest
+ {
+     @ClassRule
+     public static final DockerRule DOCKER = new DockerRule( "redis", 6379 );
+ 
+     @Override
+     // START SNIPPET: assembly
+     public void assemble( ModuleAssembly module )
+         throws AssemblyException
+     {
+         // END SNIPPET: assembly
+         super.assemble( module );
+         ModuleAssembly config = module.layer().module( "config" );
+         new EntityTestAssembler().assemble( config );
+         // START SNIPPET: assembly
+         new RedisEntityStoreAssembler().withConfig( config, Visibility.layer ).assemble(
module );
+         // END SNIPPET: assembly
+         RedisEntityStoreConfiguration redisConfig = config.forMixin( RedisEntityStoreConfiguration.class
)
+                                                           .declareDefaults();
+         redisConfig.host().set( DOCKER.getDockerHost() );
+         redisConfig.port().set( DOCKER.getExposedContainerPort( "6379/tcp" ) );
+         // START SNIPPET: assembly
+     }
+     // END SNIPPET: assembly
+ 
+     private JedisPool jedisPool;
+ 
+     @Override
+     public void setUp()
+         throws Exception
+     {
+         super.setUp();
+         RedisEntityStoreService es = serviceFinder.findService( RedisEntityStoreService.class
).get();
+         jedisPool = es.jedisPool();
+     }
+ 
+     @Override
+     public void tearDown()
+         throws Exception
+     {
+         try( Jedis jedis = jedisPool.getResource() )
+         {
+             jedis.flushDB();
+         }
+         super.tearDown();
+     }
+ }

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/32b29f99/extensions/entitystore-redis/src/test/java/org/apache/polygene/entitystore/redis/RedisEntityStoreWithCacheTest.java
----------------------------------------------------------------------
diff --cc extensions/entitystore-redis/src/test/java/org/apache/polygene/entitystore/redis/RedisEntityStoreWithCacheTest.java
index 0000000,7cd9cbe..d8c72d3
mode 000000,100644..100644
--- a/extensions/entitystore-redis/src/test/java/org/apache/polygene/entitystore/redis/RedisEntityStoreWithCacheTest.java
+++ b/extensions/entitystore-redis/src/test/java/org/apache/polygene/entitystore/redis/RedisEntityStoreWithCacheTest.java
@@@ -1,0 -1,74 +1,74 @@@
+ /*
+  *  Licensed to the Apache Software Foundation (ASF) under one
+  *  or more contributor license agreements.  See the NOTICE file
+  *  distributed with this work for additional information
+  *  regarding copyright ownership.  The ASF licenses this file
+  *  to you under the Apache License, Version 2.0 (the
+  *  "License"); you may not use this file except in compliance
+  *  with the License.  You may obtain a copy of the License at
+  *
+  *       http://www.apache.org/licenses/LICENSE-2.0
+  *
+  *  Unless required by applicable law or agreed to in writing, software
+  *  distributed under the License is distributed on an "AS IS" BASIS,
+  *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  *  See the License for the specific language governing permissions and
+  *  limitations under the License.
+  *
+  *
+  */
+ package org.apache.polygene.entitystore.redis;
+ 
+ import org.apache.polygene.api.common.Visibility;
+ import org.apache.polygene.bootstrap.AssemblyException;
+ import org.apache.polygene.bootstrap.ModuleAssembly;
+ import org.apache.polygene.entitystore.redis.assembly.RedisEntityStoreAssembler;
+ import org.apache.polygene.test.EntityTestAssembler;
+ import org.apache.polygene.test.cache.AbstractEntityStoreWithCacheTest;
 -import org.apache.polygene.test.internal.DockerRule;
++import org.apache.polygene.test.docker.DockerRule;
+ import org.junit.ClassRule;
+ import redis.clients.jedis.Jedis;
+ import redis.clients.jedis.JedisPool;
+ 
+ public class RedisEntityStoreWithCacheTest
+     extends AbstractEntityStoreWithCacheTest
+ {
+     @ClassRule
+     public static final DockerRule DOCKER = new DockerRule( "redis", 6379 );
+ 
+     @Override
+     public void assemble( ModuleAssembly module )
+         throws AssemblyException
+     {
+         super.assemble( module );
+         ModuleAssembly config = module.layer().module( "config" );
+         new EntityTestAssembler().assemble( config );
+         new RedisEntityStoreAssembler().withConfig( config, Visibility.layer ).assemble(
module );
+         RedisEntityStoreConfiguration redisConfig = config.forMixin( RedisEntityStoreConfiguration.class
)
+                                                           .declareDefaults();
+         redisConfig.host().set( DOCKER.getDockerHost() );
+         redisConfig.port().set( DOCKER.getExposedContainerPort( "6379/tcp" ) );
+     }
+ 
+     private JedisPool jedisPool;
+ 
+     @Override
+     public void setUp()
+         throws Exception
+     {
+         super.setUp();
+         RedisEntityStoreService es = serviceFinder.findService( RedisEntityStoreService.class
).get();
+         jedisPool = es.jedisPool();
+     }
+ 
+     @Override
+     public void tearDown()
+         throws Exception
+     {
+         try( Jedis jedis = jedisPool.getResource() )
+         {
+             jedis.flushDB();
+         }
+         super.tearDown();
+     }
+ }

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/32b29f99/extensions/entitystore-riak/src/test/java/org/apache/polygene/entitystore/riak/RiakEntityStoreTest.java
----------------------------------------------------------------------
diff --cc extensions/entitystore-riak/src/test/java/org/apache/polygene/entitystore/riak/RiakEntityStoreTest.java
index 0000000,621cebb..8656b62
mode 000000,100644..100644
--- a/extensions/entitystore-riak/src/test/java/org/apache/polygene/entitystore/riak/RiakEntityStoreTest.java
+++ b/extensions/entitystore-riak/src/test/java/org/apache/polygene/entitystore/riak/RiakEntityStoreTest.java
@@@ -1,0 -1,71 +1,71 @@@
+ /*
+  *  Licensed to the Apache Software Foundation (ASF) under one
+  *  or more contributor license agreements.  See the NOTICE file
+  *  distributed with this work for additional information
+  *  regarding copyright ownership.  The ASF licenses this file
+  *  to you under the Apache License, Version 2.0 (the
+  *  "License"); you may not use this file except in compliance
+  *  with the License.  You may obtain a copy of the License at
+  *
+  *       http://www.apache.org/licenses/LICENSE-2.0
+  *
+  *  Unless required by applicable law or agreed to in writing, software
+  *  distributed under the License is distributed on an "AS IS" BASIS,
+  *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  *  See the License for the specific language governing permissions and
+  *  limitations under the License.
+  */
+ package org.apache.polygene.entitystore.riak;
+ 
+ import java.util.Collections;
+ import org.apache.polygene.api.common.Visibility;
+ import org.apache.polygene.bootstrap.ModuleAssembly;
+ import org.apache.polygene.entitystore.riak.assembly.RiakEntityStoreAssembler;
+ import org.apache.polygene.test.EntityTestAssembler;
++import org.apache.polygene.test.docker.DockerRule;
+ import org.apache.polygene.test.entity.AbstractEntityStoreTest;
 -import org.apache.polygene.test.internal.DockerRule;
+ import org.junit.ClassRule;
+ 
+ public class RiakEntityStoreTest extends AbstractEntityStoreTest
+ {
+     @ClassRule
+     public static final DockerRule DOCKER = new DockerRule( "riak","riak_auth_mods started
on node");
+ 
+     private RiakFixture riakFixture;
+ 
+     @Override
+     public void setUp() throws Exception
+     {
+         super.setUp();
+         RiakEntityStoreService es = serviceFinder.findService( RiakEntityStoreService.class
).get();
+         riakFixture = new RiakFixture( es.riakClient(), es.riakNamespace() );
+         riakFixture.waitUntilReady();
+     }
+ 
+     @Override
+     public void tearDown() throws Exception
+     {
+         riakFixture.deleteTestData();
+         super.tearDown();
+     }
+ 
+     @Override
+     // START SNIPPET: assembly
+     public void assemble( ModuleAssembly module )
+     {
+         // END SNIPPET: assembly
+         super.assemble( module );
+         ModuleAssembly config = module.layer().module( "config" );
+         new EntityTestAssembler().assemble( config );
+         // START SNIPPET: assembly
+         new RiakEntityStoreAssembler().withConfig( config, Visibility.layer ).assemble(
module );
+         // END SNIPPET: assembly
+         RiakEntityStoreConfiguration riakConfig = config.forMixin( RiakEntityStoreConfiguration.class
)
+                                                         .declareDefaults();
+         String host = DOCKER.getDockerHost();
+         int port = DOCKER.getExposedContainerPort( "8087/tcp" );
+         riakConfig.hosts().set( Collections.singletonList( host + ':' + port ) );
+         // START SNIPPET: assembly
+     }
+     // END SNIPPET: assembly
+ }

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/32b29f99/extensions/entitystore-riak/src/test/java/org/apache/polygene/entitystore/riak/RiakEntityStoreWithCacheTest.java
----------------------------------------------------------------------
diff --cc extensions/entitystore-riak/src/test/java/org/apache/polygene/entitystore/riak/RiakEntityStoreWithCacheTest.java
index 0000000,1647508..9bbecb0
mode 000000,100644..100644
--- a/extensions/entitystore-riak/src/test/java/org/apache/polygene/entitystore/riak/RiakEntityStoreWithCacheTest.java
+++ b/extensions/entitystore-riak/src/test/java/org/apache/polygene/entitystore/riak/RiakEntityStoreWithCacheTest.java
@@@ -1,0 -1,69 +1,69 @@@
+ /*
+  *  Licensed to the Apache Software Foundation (ASF) under one
+  *  or more contributor license agreements.  See the NOTICE file
+  *  distributed with this work for additional information
+  *  regarding copyright ownership.  The ASF licenses this file
+  *  to you under the Apache License, Version 2.0 (the
+  *  "License"); you may not use this file except in compliance
+  *  with the License.  You may obtain a copy of the License at
+  *
+  *       http://www.apache.org/licenses/LICENSE-2.0
+  *
+  *  Unless required by applicable law or agreed to in writing, software
+  *  distributed under the License is distributed on an "AS IS" BASIS,
+  *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  *  See the License for the specific language governing permissions and
+  *  limitations under the License.
+  *
+  *
+  */
+ package org.apache.polygene.entitystore.riak;
+ 
+ import java.util.Collections;
+ import org.apache.polygene.api.common.Visibility;
+ import org.apache.polygene.bootstrap.AssemblyException;
+ import org.apache.polygene.bootstrap.ModuleAssembly;
+ import org.apache.polygene.entitystore.riak.assembly.RiakEntityStoreAssembler;
+ import org.apache.polygene.test.EntityTestAssembler;
+ import org.apache.polygene.test.cache.AbstractEntityStoreWithCacheTest;
 -import org.apache.polygene.test.internal.DockerRule;
++import org.apache.polygene.test.docker.DockerRule;
+ import org.junit.ClassRule;
+ 
+ public class RiakEntityStoreWithCacheTest extends AbstractEntityStoreWithCacheTest
+ {
+     @ClassRule
+     public static final DockerRule DOCKER = new DockerRule( "riak","riak_auth_mods started
on node");
+ 
+     private RiakFixture riakFixture;
+ 
+     @Override
+     public void setUp() throws Exception
+     {
+         super.setUp();
+         RiakEntityStoreService es = serviceFinder.findService( RiakEntityStoreService.class
).get();
+         riakFixture = new RiakFixture( es.riakClient(), es.riakNamespace() );
+         riakFixture.waitUntilReady();
+     }
+ 
+     @Override
+     public void tearDown() throws Exception
+     {
+         riakFixture.deleteTestData();
+         super.tearDown();
+     }
+ 
+     @Override
+     public void assemble( ModuleAssembly module )
+         throws AssemblyException
+     {
+         super.assemble( module );
+         ModuleAssembly config = module.layer().module( "config" );
+         new EntityTestAssembler().assemble( config );
+         new RiakEntityStoreAssembler().withConfig( config, Visibility.layer ).assemble(
module );
+         RiakEntityStoreConfiguration riakConfig = config.forMixin( RiakEntityStoreConfiguration.class
)
+                                                         .declareDefaults();
+         String host = DOCKER.getDockerHost();
+         int port = DOCKER.getExposedContainerPort( "8087/tcp" );
+         riakConfig.hosts().set( Collections.singletonList( host + ':' + port ) );
+     }
+ }

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/32b29f99/extensions/entitystore-sql/src/test/java/org/apache/polygene/entitystore/sql/MySQLEntityStoreTest.java
----------------------------------------------------------------------


Mime
View raw message