:tools:generator unignore test in generated application Most of the base set of test pass now. CI is not running these so no point ignoring them. At least this will fail for people building locally, which makes sense.
Tests involving MySQL or PostgreSQL @Ignored Project: http://git-wip-us.apache.org/repos/asf/polygene-java/repo Commit: http://git-wip-us.apache.org/repos/asf/polygene-java/commit/00568e84 Tree: http://git-wip-us.apache.org/repos/asf/polygene-java/tree/00568e84 Diff: http://git-wip-us.apache.org/repos/asf/polygene-java/diff/00568e84 Branch: refs/heads/develop Commit: 00568e84d6b30c2ad9d4a6ae3b3c13c64fa4cdff Parents: 03f41d3 Author: Paul Merlin <[email protected]> Authored: Mon Jun 5 17:09:29 2017 +0200 Committer: Paul Merlin <[email protected]> Committed: Mon Jun 5 18:11:49 2017 +0200 ---------------------------------------------------------------------- .../RestAPIApplication/bootstrap-test.tmpl | 44 ++++++++++++++------ 1 file changed, 31 insertions(+), 13 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/polygene-java/blob/00568e84/tools/generator-polygene/app/templates/RestAPIApplication/bootstrap-test.tmpl ---------------------------------------------------------------------- diff --git a/tools/generator-polygene/app/templates/RestAPIApplication/bootstrap-test.tmpl b/tools/generator-polygene/app/templates/RestAPIApplication/bootstrap-test.tmpl index ba74116..59d6751 100644 --- a/tools/generator-polygene/app/templates/RestAPIApplication/bootstrap-test.tmpl +++ b/tools/generator-polygene/app/templates/RestAPIApplication/bootstrap-test.tmpl @@ -35,8 +35,9 @@ import org.apache.polygene.bootstrap.layered.LayeredApplicationAssembler; import org.apache.polygene.tools.model.descriptor.ApplicationDetailDescriptor; import org.apache.polygene.tools.model.descriptor.ApplicationDetailDescriptorBuilder; <% -polygene.needsDelayChecker = false; +polygene.ignoredTest = ['MySQL', 'PostgreSQL'].indexOf(polygene.entitystore) != -1 || ['SQL'].indexOf(polygene.indexing) != -1; polygene.needsDocker = ['Cassandra', 'Redis', 'Riak', 'MongoDB'].indexOf(polygene.entitystore) != -1 || ['Memcache'].indexOf(polygene.caching) != -1; +polygene.needsDelayChecker = false; if( polygene.entitystore !== 'Memory' && polygene.entitystore !== 'Preferences' ) { if( polygene.entitystore.indexOf('SQL') < 0 ) { @@ -67,12 +68,20 @@ import org.junit.ClassRule; <% } %> -import org.junit.Ignore; import org.junit.Test; +<% +if( polygene.ignoredTest ) { +%> +// This combination of EntityStore and Index/Query extensions requires some manual setup +// This the respective extensions documentation for details [email protected] +<% +} +%> public class BootstrapTest { - @Test @Ignore( "TODO: Testcase doesn't work for all combinations yet. Docker issues?" ) + @Test public void applicationBootstrapSucceeds() throws Exception { @@ -111,12 +120,14 @@ public class BootstrapTest entityStoreSetup( assembly ); <% if( polygene.caching === 'Memcache' ) { -%> - cacheSetup( assembly ); +%> cacheSetup( assembly ); <% } -%> - } +if( polygene.indexing === 'SQL' ) { +%> indexingSetup( assembly ); +<% +} +%> } <% if( polygene.entitystore === 'Cassandra' ) { %> @@ -214,18 +225,16 @@ if( polygene.entitystore === 'MySQL' ) { %> private void entityStoreSetup(ApplicationAssembly assembly ) { - // A special docker image is needed, skipping this test for now - // See the SQL EntityStore documentation for details - org.junit.Assume.assumeTrue( false ); + // See the @Ignore annotation above + throw new UnsupportedOperationException(); } <% } if( polygene.entitystore === 'PostgreSQL' ) { %> private void entityStoreSetup(ApplicationAssembly assembly ) { - // A special docker image is needed, skipping this test for now - // See the SQL EntityStore documentation for details - org.junit.Assume.assumeTrue( false ); + // See the @Ignore annotation above + throw new UnsupportedOperationException(); } <% } if( polygene.entitystore === 'Preferences' ) { @@ -300,6 +309,15 @@ if( polygene.caching === 'Memcache' ) { <% } +if( polygene.indexing === 'SQL' ) { +%> + private void indexingSetup( ApplicationAssembly assembly ) + { + // See the @Ignore annotation above + throw new UnsupportedOperationException(); + } +<% +} %> <%
