You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@polygene.apache.org by pa...@apache.org on 2017/03/13 10:35:05 UTC
[13/50] [abbrv] polygene-java git commit: Reindexer was also missing
ValueSerialization in tests.
Reindexer was also missing ValueSerialization in tests.
Project: http://git-wip-us.apache.org/repos/asf/polygene-java/repo
Commit: http://git-wip-us.apache.org/repos/asf/polygene-java/commit/1ec0faa4
Tree: http://git-wip-us.apache.org/repos/asf/polygene-java/tree/1ec0faa4
Diff: http://git-wip-us.apache.org/repos/asf/polygene-java/diff/1ec0faa4
Branch: refs/heads/serialization-3.0
Commit: 1ec0faa4122c8ea0c0f3bf75865113334b7faddf
Parents: b8aea70
Author: niclas <ni...@spicter.com>
Authored: Sun Mar 12 00:03:57 2017 +0800
Committer: niclas <ni...@spicter.com>
Committed: Sun Mar 12 00:03:57 2017 +0800
----------------------------------------------------------------------
extensions/reindexer/build.gradle | 1 +
.../polygene/index/reindexer/ReindexerTest.java | 2 +
tools/generator-polygene/test/generator_test.js | 152 ++++++++++---------
3 files changed, 83 insertions(+), 72 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/polygene-java/blob/1ec0faa4/extensions/reindexer/build.gradle
----------------------------------------------------------------------
diff --git a/extensions/reindexer/build.gradle b/extensions/reindexer/build.gradle
index f956f60..1315db1 100644
--- a/extensions/reindexer/build.gradle
+++ b/extensions/reindexer/build.gradle
@@ -31,6 +31,7 @@ dependencies {
testImplementation polygene.core.testsupport
testImplementation polygene.extension( 'entitystore-jdbm' )
+ testImplementation polygene.extension( 'valueserialization-jackson' )
testImplementation polygene.extension( 'indexing-rdf' )
testRuntimeOnly libraries.logback
http://git-wip-us.apache.org/repos/asf/polygene-java/blob/1ec0faa4/extensions/reindexer/src/test/java/org/apache/polygene/index/reindexer/ReindexerTest.java
----------------------------------------------------------------------
diff --git a/extensions/reindexer/src/test/java/org/apache/polygene/index/reindexer/ReindexerTest.java b/extensions/reindexer/src/test/java/org/apache/polygene/index/reindexer/ReindexerTest.java
index 38c91a8..f3cd992 100644
--- a/extensions/reindexer/src/test/java/org/apache/polygene/index/reindexer/ReindexerTest.java
+++ b/extensions/reindexer/src/test/java/org/apache/polygene/index/reindexer/ReindexerTest.java
@@ -40,6 +40,7 @@ import org.apache.polygene.index.rdf.assembly.RdfNativeSesameStoreAssembler;
import org.apache.polygene.library.rdf.repository.NativeConfiguration;
import org.apache.polygene.test.AbstractPolygeneTest;
import org.apache.polygene.test.EntityTestAssembler;
+import org.apache.polygene.valueserialization.jackson.assembly.JacksonValueSerializationAssembler;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.TemporaryFolder;
@@ -66,6 +67,7 @@ public class ReindexerTest
// Native Sesame EntityFinder
new RdfNativeSesameStoreAssembler().assemble( module );
+ new JacksonValueSerializationAssembler().assemble( module );
// Reindexer
// START SNIPPET: assembly
http://git-wip-us.apache.org/repos/asf/polygene-java/blob/1ec0faa4/tools/generator-polygene/test/generator_test.js
----------------------------------------------------------------------
diff --git a/tools/generator-polygene/test/generator_test.js b/tools/generator-polygene/test/generator_test.js
index e215d4c..07b9c84 100644
--- a/tools/generator-polygene/test/generator_test.js
+++ b/tools/generator-polygene/test/generator_test.js
@@ -17,7 +17,7 @@ describe('polygene-generator-defaults', function () {
});
});
-[
+var entityStores = [
'Cassandra',
'File',
'Geode',
@@ -31,97 +31,105 @@ describe('polygene-generator-defaults', function () {
'Riak',
'SQL',
'Memory' // Somehow the last EntityStore is used in subsequent test arrays. Pick the fastest.
-].forEach(function (entityStore) {
- describe('polygene-generator-default-and-' + entityStore.toLowerCase() + "-entitystore", function () {
- this.timeout(10000);
- it('generates a Gradle buildable Apache Polygene project with ' + entityStore + ' as the Entity Store', function () {
- return helpers.run(path.join(__dirname, '../app'))
- .withPrompts({
- name: 'test-project',
- packageName: 'org.apache.polygene.generator.test',
- entitystore: entityStore
- })
- .then(buildAndVerify);
- });
- });
-});
+];
-[
+var indexings = [
'Rdf',
'ElasticSearch',
'Solr',
'SQL'
-].forEach(function (indexing) {
- describe('polygene-generator-default-and-' + indexing.toLowerCase() + '-indexing', function () {
- this.timeout(10000);
- it('generates a Gradle buildable Apache Polygene project with '+ indexing + ' as the Indexing system', function () {
- return helpers.run(path.join(__dirname, '../app'))
- .withPrompts({
- name: 'test-project',
- packageName: 'org.apache.polygene.generator.test',
- indexing: indexing
- })
- .then(buildAndVerify);
- });
- });
-});
+];
-[
+var cachings = [
'None',
'Memcache',
'EhCache'
-].forEach(function (caching) {
- describe('polygene-generator-default-and-' + caching.toLowerCase() + '-caching', function () {
- this.timeout(10000);
- it('generates a Gradle buildable Apache Polygene project with '+caching+' as the Caching system', function () {
- return helpers.run(path.join(__dirname, '../app'))
- .withPrompts({
- name: 'test-project',
- packageName: 'org.apache.polygene.generator.test',
- caching: caching
- })
- .then(buildAndVerify);
- });
- });
-});
+];
-[
+var serializations = [
'Jackson',
// 'Johnzon',
'Stax'
-].forEach(function (serialization) {
- describe('polygene-generator-default-and-' + serialization.toLowerCase() + '-caching', function () {
- this.timeout(10000);
- it('generates a Gradle buildable Apache Polygene project with '+serialization+' as the Serialization system', function () {
- return helpers.run(path.join(__dirname, '../app'))
- .withPrompts({
- name: 'test-project',
- packageName: 'org.apache.polygene.generator.test',
- serialization: serialization
- })
- .then(buildAndVerify);
- });
- });
-});
+];
-[
+var metricses = [
'None',
'Codahale'
-].forEach(function (metrics) {
- describe('polygene-generator-default-and-' + metrics.toLowerCase() + '-caching', function () {
- this.timeout(10000);
- it('generates a Gradle buildable Apache Polygene project with '+metrics+' as the Metrics system', function () {
- return helpers.run(path.join(__dirname, '../app'))
- .withPrompts({
- name: 'test-project',
- packageName: 'org.apache.polygene.generator.test',
- metrics: metrics
- })
- .then(buildAndVerify);
+];
+
+var featuresset = [
+ [],
+ ['rest api'],
+ ['security'],
+ ['rest api, security']
+];
+
+entityStores.forEach(function (entityStore) {
+ test(entityStore, "Rdf", "Jackson", "Memcache", "Codahale", "[]");
+});
+
+indexings.forEach(function (indexing) {
+ test("Memory", indexing, "Jackson", "Memcache", "Codahale", "[]");
+});
+
+serializations.forEach(function (serialization) {
+ test("Memory", "Rdf", serialization, "Memcache", "Codahale", "[]");
+});
+
+cachings.forEach(function (caching) {
+ test("Memory", "Rdf", "Jackson", caching, "Codahale", "[]");
+});
+
+metricses.forEach(function (metrics) {
+ test("Memory", "Rdf", "Jackson", "Memcache", metrics, "[]");
+});
+
+featuresset.forEach(function (feature) {
+ test("Memory", "Rdf", "Jackson", "Memcache", "Codahale", feature);
+});
+
+// All Tests !!!!
+entityStores.forEach(function (entitystore) {
+ indexings.forEach(function (indexing) {
+ serializations.forEach(function (serialization) {
+ cachings.forEach(function (caching) {
+ metricses.forEach(function (metrics) {
+ featuresset.forEach(function (features) {
+ test(entitystore, indexing, serialization, caching, metrics, features)
+ });
+ });
+ });
});
});
});
+function test(entityStore, indexing, serialization, caching, metrics, features) {
+ describe('polygene-generator-default-and-' + entityStore.toLowerCase() + "-entitystore", function () {
+ this.timeout(10000);
+ it('generates a Gradle buildable Apache Polygene project with '
+ + entityStore + 'EntityStore, '
+ + indexing + 'Indexing, '
+ + serialization + 'Serialzation, '
+ + caching + 'Caching, '
+ + metrics + 'Metrics, '
+ + ' and ' + features + '.',
+ function () {
+ return helpers.run(path.join(__dirname, '../app'))
+ .withPrompts({
+ name: 'test-project',
+ packageName: 'org.apache.polygene.generator.test',
+
+ entitystore: entityStore,
+ serialization: serialization,
+ indexing: indexing,
+ caching: caching,
+ metrics: metrics,
+ features: features
+ })
+ .then(buildAndVerify);
+ });
+ });
+}
function buildAndVerify(dir) {
assert.file(['gradlew', 'settings.gradle', 'build.gradle']);