polygene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nic...@apache.org
Subject [21/25] polygene-java git commit: Managed to get everything to build and tests passing with only JUnit5 in place.
Date Thu, 19 Apr 2018 02:48:02 GMT
http://git-wip-us.apache.org/repos/asf/polygene-java/blob/f2fcd58d/extensions/entitystore-sqlkv/src/test/java/org/apache/polygene/entitystore/sqlkv/MySQLEntityStoreTestSuite.java
----------------------------------------------------------------------
diff --git a/extensions/entitystore-sqlkv/src/test/java/org/apache/polygene/entitystore/sqlkv/MySQLEntityStoreTestSuite.java
b/extensions/entitystore-sqlkv/src/test/java/org/apache/polygene/entitystore/sqlkv/MySQLEntityStoreTestSuite.java
index 639d1d0..ed15aa3 100644
--- a/extensions/entitystore-sqlkv/src/test/java/org/apache/polygene/entitystore/sqlkv/MySQLEntityStoreTestSuite.java
+++ b/extensions/entitystore-sqlkv/src/test/java/org/apache/polygene/entitystore/sqlkv/MySQLEntityStoreTestSuite.java
@@ -42,7 +42,9 @@ import org.junit.jupiter.api.Disabled;
              @Environment(key = "MYSQL_DATABASE", value = "jdbc_test_db"),
              @Environment( key = "MYSQL_ROOT_HOST", value = "172.17.0.1"),
          },
-         waitFor = @WaitFor( value = "mysqld: ready for connections", timeoutInMillis = 30000))
+         waitFor = @WaitFor( value = "mysqld: ready for connections", timeoutInMillis = 30000),
+         newForEachCase = false
+)
 public class MySQLEntityStoreTestSuite extends EntityStoreTestSuite
 {
     @Override

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/f2fcd58d/extensions/entitystore-sqlkv/src/test/java/org/apache/polygene/entitystore/sqlkv/PostgreSQLEntityStoreTest.java
----------------------------------------------------------------------
diff --git a/extensions/entitystore-sqlkv/src/test/java/org/apache/polygene/entitystore/sqlkv/PostgreSQLEntityStoreTest.java
b/extensions/entitystore-sqlkv/src/test/java/org/apache/polygene/entitystore/sqlkv/PostgreSQLEntityStoreTest.java
index 6f1622e..0c6aa81 100644
--- a/extensions/entitystore-sqlkv/src/test/java/org/apache/polygene/entitystore/sqlkv/PostgreSQLEntityStoreTest.java
+++ b/extensions/entitystore-sqlkv/src/test/java/org/apache/polygene/entitystore/sqlkv/PostgreSQLEntityStoreTest.java
@@ -34,8 +34,11 @@ import org.apache.polygene.test.entity.AbstractEntityStoreTest;
 import org.jooq.SQLDialect;
 import org.junit.jupiter.api.AfterEach;
 
-@Docker( image = "postgres", ports = @Port( exposed = 8801, inner = 5432),
-         waitFor = @WaitFor( value = "PostgreSQL init process complete; ready for start up.",
timeoutInMillis = 30000))
+@Docker( image = "org.apache.polygene:org.apache.polygene.internal.docker-postgres",
+         ports = @Port( exposed = 8801, inner = 5432),
+         waitFor = @WaitFor( value = "PostgreSQL init process complete; ready for start up.",
timeoutInMillis = 30000),
+         newForEachCase = false
+)
 public class PostgreSQLEntityStoreTest extends AbstractEntityStoreTest
 {
     @Override

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/f2fcd58d/extensions/entitystore-sqlkv/src/test/java/org/apache/polygene/entitystore/sqlkv/PostgreSQLEntityStoreTestSuite.java
----------------------------------------------------------------------
diff --git a/extensions/entitystore-sqlkv/src/test/java/org/apache/polygene/entitystore/sqlkv/PostgreSQLEntityStoreTestSuite.java
b/extensions/entitystore-sqlkv/src/test/java/org/apache/polygene/entitystore/sqlkv/PostgreSQLEntityStoreTestSuite.java
index 4781389..6016bea 100644
--- a/extensions/entitystore-sqlkv/src/test/java/org/apache/polygene/entitystore/sqlkv/PostgreSQLEntityStoreTestSuite.java
+++ b/extensions/entitystore-sqlkv/src/test/java/org/apache/polygene/entitystore/sqlkv/PostgreSQLEntityStoreTestSuite.java
@@ -32,8 +32,11 @@ import org.apache.polygene.test.entity.model.EntityStoreTestSuite;
 import org.jooq.SQLDialect;
 import org.junit.jupiter.api.AfterEach;
 
-@Docker( image = "postgres", ports = @Port( exposed = 8801, inner = 5432),
-         waitFor = @WaitFor( value = "PostgreSQL init process complete; ready for start up.",
timeoutInMillis = 30000))
+@Docker( image = "org.apache.polygene:org.apache.polygene.internal.docker-postgres",
+         ports = @Port( exposed = 8801, inner = 5432),
+         waitFor = @WaitFor( value = "PostgreSQL init process complete; ready for start up.",
timeoutInMillis = 30000),
+         newForEachCase = false
+)
 public class PostgreSQLEntityStoreTestSuite extends EntityStoreTestSuite
 {
     @Override
@@ -70,9 +73,8 @@ public class PostgreSQLEntityStoreTestSuite extends EntityStoreTestSuite
     }
     // END SNIPPET: assembly
 
-    @Override
     @AfterEach
-    public void tearDown()
+    public void cleanUpData()
     {
         TearDown.dropTables( application.findModule( INFRASTRUCTURE_LAYER, STORAGE_MODULE
), SQLDialect.POSTGRES, super::tearDown );
     }

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/f2fcd58d/extensions/indexing-elasticsearch/src/test/java/org/apache/polygene/index/elasticsearch/ElasticSearchFinderTest.java
----------------------------------------------------------------------
diff --git a/extensions/indexing-elasticsearch/src/test/java/org/apache/polygene/index/elasticsearch/ElasticSearchFinderTest.java
b/extensions/indexing-elasticsearch/src/test/java/org/apache/polygene/index/elasticsearch/ElasticSearchFinderTest.java
index 98bf878..0e9f045 100644
--- a/extensions/indexing-elasticsearch/src/test/java/org/apache/polygene/index/elasticsearch/ElasticSearchFinderTest.java
+++ b/extensions/indexing-elasticsearch/src/test/java/org/apache/polygene/index/elasticsearch/ElasticSearchFinderTest.java
@@ -34,8 +34,7 @@ import static org.apache.polygene.test.util.Assume.assumeNoIbmJdk;
 
 @SuppressWarnings( "unused" )
 @ExtendWith( { TemporaryFolder.class, EmbeddedElasticSearchExtension.class, TestName.class
} )
-public class ElasticSearchFinderTest
-    extends AbstractEntityFinderTest
+public class ElasticSearchFinderTest extends AbstractEntityFinderTest
 {
     private static EmbeddedElasticSearchExtension ELASTIC_SEARCH;
 

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/f2fcd58d/extensions/indexing-elasticsearch/src/test/java/org/apache/polygene/index/elasticsearch/ElasticSearchQueryTest.java
----------------------------------------------------------------------
diff --git a/extensions/indexing-elasticsearch/src/test/java/org/apache/polygene/index/elasticsearch/ElasticSearchQueryTest.java
b/extensions/indexing-elasticsearch/src/test/java/org/apache/polygene/index/elasticsearch/ElasticSearchQueryTest.java
index 44f4102..52ddf21 100644
--- a/extensions/indexing-elasticsearch/src/test/java/org/apache/polygene/index/elasticsearch/ElasticSearchQueryTest.java
+++ b/extensions/indexing-elasticsearch/src/test/java/org/apache/polygene/index/elasticsearch/ElasticSearchQueryTest.java
@@ -31,8 +31,8 @@ import org.apache.polygene.test.EntityTestAssembler;
 import org.apache.polygene.test.TemporaryFolder;
 import org.apache.polygene.test.TestName;
 import org.apache.polygene.test.indexing.AbstractQueryTest;
-import org.apache.polygene.test.util.NotYetImplemented;
 import org.junit.jupiter.api.BeforeAll;
+import org.junit.jupiter.api.Disabled;
 import org.junit.jupiter.api.Test;
 import org.junit.jupiter.api.extension.ExtendWith;
 
@@ -80,7 +80,7 @@ public class ElasticSearchQueryTest extends AbstractQueryTest
             .assemble( module );
     }
 
-    @NotYetImplemented( reason = "IndexExporter service not implemented" )
+    @Disabled( "IndexExporter service not implemented" )
     @Test
     @Override
     public void showNetwork()
@@ -89,7 +89,7 @@ public class ElasticSearchQueryTest extends AbstractQueryTest
         super.showNetwork();
     }
 
-    @NotYetImplemented( reason = "oneOf() Query Expression not implemented" )
+    @Disabled( "oneOf() Query Expression not implemented" )
     @Test
     @Override
     public void script23()
@@ -97,9 +97,8 @@ public class ElasticSearchQueryTest extends AbstractQueryTest
         super.script23();
     }
 
-    @NotYetImplemented(
-        reason = "ElasticSearch perform automatic TimeZone resolution when querying on dates,
"
-                 + "this test assert that the underlying Index/Query engine do not."
+    @Disabled(
+        "ElasticSearch perform automatic TimeZone resolution when querying on dates, this
test assert that the underlying Index/Query engine do not."
     )
     @Test
     @Override

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/f2fcd58d/extensions/indexing-elasticsearch/src/test/java/org/apache/polygene/index/elasticsearch/ElasticSearchTest.java
----------------------------------------------------------------------
diff --git a/extensions/indexing-elasticsearch/src/test/java/org/apache/polygene/index/elasticsearch/ElasticSearchTest.java
b/extensions/indexing-elasticsearch/src/test/java/org/apache/polygene/index/elasticsearch/ElasticSearchTest.java
index e9bb52e..d463b8a 100644
--- a/extensions/indexing-elasticsearch/src/test/java/org/apache/polygene/index/elasticsearch/ElasticSearchTest.java
+++ b/extensions/indexing-elasticsearch/src/test/java/org/apache/polygene/index/elasticsearch/ElasticSearchTest.java
@@ -197,7 +197,7 @@ public class ElasticSearchTest
 
         QueryBuilder<Post> queryBuilder = queryBuilderFactory.newQueryBuilder( Post.class
);
         Query<Post> query = uow.newQuery( queryBuilder );
-        assertThat( query.count(), equalTo( 1 ) );
+        assertThat( query.count(), equalTo( 1L ) );
         post = query.find();
         assertThat( post, notNullValue() );
         assertThat( post.title().get(), equalTo( title ) );
@@ -205,7 +205,7 @@ public class ElasticSearchTest
         post = templateFor( Post.class );
         queryBuilder = queryBuilderFactory.newQueryBuilder( Post.class ).where( eq( post.title(),
title ) );
         query = uow.newQuery( queryBuilder );
-        assertThat( query.count(), equalTo( 1 ) );
+        assertThat( query.count(), equalTo( 1L ) );
         post = query.find();
         assertThat( post, notNullValue() );
         assertThat( post.title().get(), equalTo( title ) );
@@ -214,13 +214,13 @@ public class ElasticSearchTest
         queryBuilder = queryBuilderFactory.newQueryBuilder( Post.class )
                                           .where( eq( post.title(), "Not available" ) );
         query = uow.newQuery( queryBuilder );
-        assertThat( query.count(), equalTo( 0 ) );
+        assertThat( query.count(), equalTo( 0L ) );
 
         post = templateFor( Post.class );
         queryBuilder = queryBuilderFactory.newQueryBuilder( Post.class )
                                           .where( ne( post.title(), "Not available" ) );
         query = uow.newQuery( queryBuilder );
-        assertThat( query.count(), equalTo( 1 ) );
+        assertThat( query.count(), equalTo( 1L ) );
 
         post = templateFor( Post.class );
         queryBuilder = queryBuilderFactory.newQueryBuilder( Post.class )
@@ -234,7 +234,7 @@ public class ElasticSearchTest
         queryBuilder = queryBuilderFactory.newQueryBuilder( Post.class )
                                           .where( eq( post.author().get().nickname(), "eskatos"
) );
         query = uow.newQuery( queryBuilder );
-        assertThat( query.count(), equalTo( 1 ) );
+        assertThat( query.count(), equalTo( 1L ) );
         post = query.find();
         assertThat( post, notNullValue() );
         assertThat( post.title().get(), equalTo( title ) );

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/f2fcd58d/extensions/indexing-elasticsearch/src/test/java/org/apache/polygene/index/elasticsearch/EmbeddedElasticSearchExtension.java
----------------------------------------------------------------------
diff --git a/extensions/indexing-elasticsearch/src/test/java/org/apache/polygene/index/elasticsearch/EmbeddedElasticSearchExtension.java
b/extensions/indexing-elasticsearch/src/test/java/org/apache/polygene/index/elasticsearch/EmbeddedElasticSearchExtension.java
index ad46200..9333d96 100644
--- a/extensions/indexing-elasticsearch/src/test/java/org/apache/polygene/index/elasticsearch/EmbeddedElasticSearchExtension.java
+++ b/extensions/indexing-elasticsearch/src/test/java/org/apache/polygene/index/elasticsearch/EmbeddedElasticSearchExtension.java
@@ -17,6 +17,7 @@
  */
 package org.apache.polygene.index.elasticsearch;
 
+import java.lang.reflect.Modifier;
 import java.lang.reflect.UndeclaredThrowableException;
 import java.util.Locale;
 import org.apache.polygene.api.activation.ActivationException;
@@ -34,7 +35,6 @@ import org.apache.polygene.test.TemporaryFolder;
 import org.elasticsearch.client.Client;
 import org.junit.jupiter.api.extension.AfterAllCallback;
 import org.junit.jupiter.api.extension.BeforeAllCallback;
-import org.junit.jupiter.api.extension.ExtendWith;
 import org.junit.jupiter.api.extension.ExtensionContext;
 
 import static org.junit.platform.commons.util.ReflectionUtils.HierarchyTraversalMode.BOTTOM_UP;
@@ -46,7 +46,6 @@ import static org.junit.platform.commons.util.ReflectionUtils.findFields;
  * Starting from Elasticsearch 5, startup is way slower.
  * Reuse an embedded instance across tests.
  */
-@ExtendWith( TemporaryFolder.class )
 public class EmbeddedElasticSearchExtension
     implements BeforeAllCallback, AfterAllCallback
 {
@@ -108,12 +107,11 @@ public class EmbeddedElasticSearchExtension
 
     @Override
     public void beforeAll( ExtensionContext context )
-        throws Exception
     {
         this.tmpDir = new TemporaryFolder();
-        this.tmpDir.beforeEach( context );
+        this.tmpDir.createDir();
 
-        String name = indexName( context.getRequiredTestClass().getSimpleName(), context.getRequiredTestMethod().getName()
);
+        String name = indexName( context.getRequiredTestClass().getSimpleName(), null );
         SingletonAssembler assembler = activateEmbeddedElasticsearch( name );
         application = assembler.application();
         client = findClient( assembler.module() );
@@ -128,7 +126,11 @@ public class EmbeddedElasticSearchExtension
                 try
                 {
                     f.setAccessible( true );
-                    f.set( context.getRequiredTestInstance(), this );
+                    if( Modifier.isStatic( f.getModifiers() ) )
+                    {
+                        // only allow static field injections (for now).
+                        f.set( null, EmbeddedElasticSearchExtension.this );
+                    }
                 }
                 catch( IllegalAccessException e )
                 {
@@ -141,9 +143,17 @@ public class EmbeddedElasticSearchExtension
     public void afterAll( ExtensionContext context )
         throws Exception
     {
-        application.passivate();
-        client.close();
-        client = null;
-        tmpDir.afterEach( context );
+        if( application != null )
+        {
+            application.passivate();
+        }
+        if( client != null )
+        {
+            client.close();
+        }
+        if( tmpDir != null )
+        {
+            tmpDir.afterEach( context );
+        }
     }
 }

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/f2fcd58d/extensions/indexing-sql/build.gradle
----------------------------------------------------------------------
diff --git a/extensions/indexing-sql/build.gradle b/extensions/indexing-sql/build.gradle
index caa5cc7..d5a88c7 100644
--- a/extensions/indexing-sql/build.gradle
+++ b/extensions/indexing-sql/build.gradle
@@ -33,7 +33,7 @@ dependencies {
 
   runtimeOnly polygene.core.runtime
 
-  testImplementation polygene.internals.testsupport
+  testImplementation polygene.core.testsupport
   testImplementation polygene.library( 'sql-dbcp' )
   testImplementation libraries.docker_junit
 

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/f2fcd58d/extensions/indexing-sql/src/test/java/org/apache/polygene/index/sql/postgresql/PostgreSQLComplexQueryTest.java
----------------------------------------------------------------------
diff --git a/extensions/indexing-sql/src/test/java/org/apache/polygene/index/sql/postgresql/PostgreSQLComplexQueryTest.java
b/extensions/indexing-sql/src/test/java/org/apache/polygene/index/sql/postgresql/PostgreSQLComplexQueryTest.java
index 938ccf4..65df15d 100644
--- a/extensions/indexing-sql/src/test/java/org/apache/polygene/index/sql/postgresql/PostgreSQLComplexQueryTest.java
+++ b/extensions/indexing-sql/src/test/java/org/apache/polygene/index/sql/postgresql/PostgreSQLComplexQueryTest.java
@@ -27,8 +27,11 @@ import org.apache.polygene.bootstrap.ModuleAssembly;
 import org.apache.polygene.test.indexing.AbstractComplexQueryTest;
 import org.junit.jupiter.api.BeforeEach;
 
-@Docker( image = "postgres", ports = @Port( exposed = 8801, inner = 5432),
-         waitFor = @WaitFor( value = "PostgreSQL init process complete; ready for start up.",
timeoutInMillis = 30000))
+@Docker( image = "org.apache.polygene:org.apache.polygene.internal.docker-postgres",
+         ports = @Port( exposed = 8801, inner = 5432),
+         waitFor = @WaitFor( value = "PostgreSQL init process complete; ready for start up.",
timeoutInMillis = 30000),
+         newForEachCase = false
+)
 public class PostgreSQLComplexQueryTest
     extends AbstractComplexQueryTest
 {
@@ -37,6 +40,7 @@ public class PostgreSQLComplexQueryTest
     public void assemble( ModuleAssembly mainModule )
         throws AssemblyException
     {
+        SQLTestHelper.sleep();
         super.assemble( mainModule );
         String host = "localhost";
         int port = 8801;

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/f2fcd58d/extensions/indexing-sql/src/test/java/org/apache/polygene/index/sql/postgresql/PostgreSQLDBIntegrityTest.java
----------------------------------------------------------------------
diff --git a/extensions/indexing-sql/src/test/java/org/apache/polygene/index/sql/postgresql/PostgreSQLDBIntegrityTest.java
b/extensions/indexing-sql/src/test/java/org/apache/polygene/index/sql/postgresql/PostgreSQLDBIntegrityTest.java
index 8d6d4a8..4761737 100644
--- a/extensions/indexing-sql/src/test/java/org/apache/polygene/index/sql/postgresql/PostgreSQLDBIntegrityTest.java
+++ b/extensions/indexing-sql/src/test/java/org/apache/polygene/index/sql/postgresql/PostgreSQLDBIntegrityTest.java
@@ -45,8 +45,11 @@ import org.junit.jupiter.api.Test;
 import static org.hamcrest.MatcherAssert.assertThat;
 import static org.hamcrest.core.IsEqual.equalTo;
 
-@Docker( image = "postgres", ports = @Port( exposed = 8801, inner = 5432 ),
-         waitFor = @WaitFor( value = "PostgreSQL init process complete; ready for start up.",
timeoutInMillis = 30000 ) )
+@Docker( image = "org.apache.polygene:org.apache.polygene.internal.docker-postgres",
+         ports = @Port( exposed = 8801, inner = 5432 ),
+         waitFor = @WaitFor( value = "PostgreSQL init process complete; ready for start up.",
timeoutInMillis = 30000 ),
+         newForEachCase = false
+)
 public class PostgreSQLDBIntegrityTest
     extends AbstractPolygeneTest
 {
@@ -64,6 +67,7 @@ public class PostgreSQLDBIntegrityTest
     public void assemble( ModuleAssembly module )
         throws AssemblyException
     {
+        SQLTestHelper.sleep();
         String host = "localhost";
         int port = 8801;
         SQLTestHelper.assembleWithMemoryEntityStore( module, host, port );

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/f2fcd58d/extensions/indexing-sql/src/test/java/org/apache/polygene/index/sql/postgresql/PostgreSQLEntityFinderTest.java
----------------------------------------------------------------------
diff --git a/extensions/indexing-sql/src/test/java/org/apache/polygene/index/sql/postgresql/PostgreSQLEntityFinderTest.java
b/extensions/indexing-sql/src/test/java/org/apache/polygene/index/sql/postgresql/PostgreSQLEntityFinderTest.java
index 70daf02..a341008 100644
--- a/extensions/indexing-sql/src/test/java/org/apache/polygene/index/sql/postgresql/PostgreSQLEntityFinderTest.java
+++ b/extensions/indexing-sql/src/test/java/org/apache/polygene/index/sql/postgresql/PostgreSQLEntityFinderTest.java
@@ -27,8 +27,11 @@ import org.apache.polygene.bootstrap.ModuleAssembly;
 import org.apache.polygene.test.indexing.AbstractEntityFinderTest;
 import org.junit.jupiter.api.BeforeEach;
 
-@Docker( image = "postgres", ports = @Port( exposed = 8801, inner = 5432),
-         waitFor = @WaitFor( value = "PostgreSQL init process complete; ready for start up.",
timeoutInMillis = 30000))
+@Docker( image = "org.apache.polygene:org.apache.polygene.internal.docker-postgres",
+         ports = @Port( exposed = 8801, inner = 5432),
+         waitFor = @WaitFor( value = "PostgreSQL init process complete; ready for start up.",
timeoutInMillis = 30000),
+         newForEachCase = false
+)
 public class PostgreSQLEntityFinderTest
     extends AbstractEntityFinderTest
 {
@@ -36,6 +39,7 @@ public class PostgreSQLEntityFinderTest
     public void assemble( ModuleAssembly mainModule )
         throws AssemblyException
     {
+        SQLTestHelper.sleep();
         super.assemble( mainModule );
         String host = "localhost";
         int port = 8801;

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/f2fcd58d/extensions/indexing-sql/src/test/java/org/apache/polygene/index/sql/postgresql/PostgreSQLQueryTest.java
----------------------------------------------------------------------
diff --git a/extensions/indexing-sql/src/test/java/org/apache/polygene/index/sql/postgresql/PostgreSQLQueryTest.java
b/extensions/indexing-sql/src/test/java/org/apache/polygene/index/sql/postgresql/PostgreSQLQueryTest.java
index c135098..41c3efd 100644
--- a/extensions/indexing-sql/src/test/java/org/apache/polygene/index/sql/postgresql/PostgreSQLQueryTest.java
+++ b/extensions/indexing-sql/src/test/java/org/apache/polygene/index/sql/postgresql/PostgreSQLQueryTest.java
@@ -34,8 +34,11 @@ import org.junit.jupiter.api.Test;
  * <p>Many features are not supported.</p>
  */
 // See org.apache.polygene.index.sql.support.skeletons.SQLCompatEntityStateWrapper that filter
out unsupported properties.
-@Docker( image = "postgres", ports = @Port( exposed = 8801, inner = 5432),
-         waitFor = @WaitFor( value = "PostgreSQL init process complete; ready for start up.",
timeoutInMillis = 30000))
+@Docker( image = "org.apache.polygene:org.apache.polygene.internal.docker-postgres",
+         ports = @Port( exposed = 8801, inner = 5432),
+         waitFor = @WaitFor( value = "PostgreSQL init process complete; ready for start up.",
timeoutInMillis = 30000),
+         newForEachCase = false
+)
 public class PostgreSQLQueryTest
     extends AbstractQueryTest
 {
@@ -43,6 +46,7 @@ public class PostgreSQLQueryTest
     public void assemble( ModuleAssembly mainModule )
         throws AssemblyException
     {
+        SQLTestHelper.sleep();
         super.assemble( mainModule );
         String host = "localhost";
         int port = 8801;

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/f2fcd58d/extensions/indexing-sql/src/test/java/org/apache/polygene/index/sql/postgresql/SQLTestHelper.java
----------------------------------------------------------------------
diff --git a/extensions/indexing-sql/src/test/java/org/apache/polygene/index/sql/postgresql/SQLTestHelper.java
b/extensions/indexing-sql/src/test/java/org/apache/polygene/index/sql/postgresql/SQLTestHelper.java
index b911eae..b72646e 100644
--- a/extensions/indexing-sql/src/test/java/org/apache/polygene/index/sql/postgresql/SQLTestHelper.java
+++ b/extensions/indexing-sql/src/test/java/org/apache/polygene/index/sql/postgresql/SQLTestHelper.java
@@ -121,4 +121,15 @@ class SQLTestHelper
     private SQLTestHelper()
     {
     }
+
+    static void sleep()
+    {
+        try
+        {
+            Thread.sleep(500);
+        }
+        catch( InterruptedException e )
+        {
+        }
+    }
 }

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/f2fcd58d/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 995ef24..618fa8e 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
@@ -131,7 +131,7 @@ public class ReindexerTest
         qBuilder = qBuilder.where( eq( templateFor( MyEntity.class ).name(), TEST_NAME )
);
         Query<MyEntity> q = uow.newQuery( qBuilder );
 
-        assertThat( q.count(), equalTo( 1 ) );
+        assertThat( q.count(), equalTo( 1L ) );
         assertThat( q.iterator().next().name().get(), equalTo( TEST_NAME ) );
 
         uow.complete();

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/f2fcd58d/internals/testsupport-internal/build.gradle
----------------------------------------------------------------------
diff --git a/internals/testsupport-internal/build.gradle b/internals/testsupport-internal/build.gradle
index 4439c49..a1c92ad 100644
--- a/internals/testsupport-internal/build.gradle
+++ b/internals/testsupport-internal/build.gradle
@@ -20,12 +20,3 @@ apply plugin: 'polygene-internal'
 apply plugin: 'polygene-internal-docker'
 
 description = "Apache Polygene™ Internal Test Support"
-
-jar { manifest { name = "Apache Polygene™ Internals - Test Support" } }
-
-dependencies {
-    api polygene.core.testsupport
-
-    implementation (libraries.docker_junit )
-    runtimeOnly polygene.core.runtime
-}

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/f2fcd58d/internals/testsupport-internal/src/main/docker/mariadb/Dockerfile
----------------------------------------------------------------------
diff --git a/internals/testsupport-internal/src/main/docker/mariadb/Dockerfile b/internals/testsupport-internal/src/main/docker/mariadb/Dockerfile
new file mode 100644
index 0000000..967d45d
--- /dev/null
+++ b/internals/testsupport-internal/src/main/docker/mariadb/Dockerfile
@@ -0,0 +1,16 @@
+# 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.
+
+FROM @mariadb@
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/f2fcd58d/internals/testsupport-internal/src/main/docker/mysql/Dockerfile
----------------------------------------------------------------------
diff --git a/internals/testsupport-internal/src/main/docker/mysql/Dockerfile b/internals/testsupport-internal/src/main/docker/mysql/Dockerfile
index 967d45d..e2620e6 100644
--- a/internals/testsupport-internal/src/main/docker/mysql/Dockerfile
+++ b/internals/testsupport-internal/src/main/docker/mysql/Dockerfile
@@ -13,4 +13,4 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-FROM @mariadb@
\ No newline at end of file
+FROM @mysql@
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/f2fcd58d/internals/testsupport-internal/src/main/java/org/apache/polygene/test/docker/DockerExtension.java
----------------------------------------------------------------------
diff --git a/internals/testsupport-internal/src/main/java/org/apache/polygene/test/docker/DockerExtension.java
b/internals/testsupport-internal/src/main/java/org/apache/polygene/test/docker/DockerExtension.java
deleted file mode 100644
index 64f8d7a..0000000
--- a/internals/testsupport-internal/src/main/java/org/apache/polygene/test/docker/DockerExtension.java
+++ /dev/null
@@ -1,23 +0,0 @@
-package org.apache.polygene.test.docker;
-
-import org.junit.jupiter.api.extension.AfterAllCallback;
-import org.junit.jupiter.api.extension.BeforeAllCallback;
-import org.junit.jupiter.api.extension.ExtensionContext;
-
-public class DockerExtension
-    implements BeforeAllCallback, AfterAllCallback
-{
-    @Override
-    public void afterAll( ExtensionContext context )
-        throws Exception
-    {
-
-    }
-
-    @Override
-    public void beforeAll( ExtensionContext context )
-        throws Exception
-    {
-
-    }
-}

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/f2fcd58d/internals/testsupport-internal/src/main/java/org/apache/polygene/test/docker/Dummy.java
----------------------------------------------------------------------
diff --git a/internals/testsupport-internal/src/main/java/org/apache/polygene/test/docker/Dummy.java
b/internals/testsupport-internal/src/main/java/org/apache/polygene/test/docker/Dummy.java
new file mode 100644
index 0000000..eb0301d
--- /dev/null
+++ b/internals/testsupport-internal/src/main/java/org/apache/polygene/test/docker/Dummy.java
@@ -0,0 +1,24 @@
+/*
+ *  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.test.docker;
+
+public class Dummy
+{
+}

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/f2fcd58d/internals/testsupport-internal/src/main/java/org/apache/polygene/test/docker/package.html
----------------------------------------------------------------------
diff --git a/internals/testsupport-internal/src/main/java/org/apache/polygene/test/docker/package.html
b/internals/testsupport-internal/src/main/java/org/apache/polygene/test/docker/package.html
deleted file mode 100644
index 48031f2..0000000
--- a/internals/testsupport-internal/src/main/java/org/apache/polygene/test/docker/package.html
+++ /dev/null
@@ -1,25 +0,0 @@
-<!--
-  ~  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.
-  ~
-  ~
--->
-
-<html>
-<body>
-<h1>Polygene Internal Docker TestSupport.</h1>
-</body>
-</html>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/f2fcd58d/libraries/http/build.gradle
----------------------------------------------------------------------
diff --git a/libraries/http/build.gradle b/libraries/http/build.gradle
index 651249b..d1a43b8 100644
--- a/libraries/http/build.gradle
+++ b/libraries/http/build.gradle
@@ -41,6 +41,7 @@ dependencies {
   testImplementation libraries.junit
 
   testRuntimeOnly libraries.logback
+  testRuntimeOnly libraries.junit_engine
 }
 
 // Do not run vhost tests on Java >= 9 because they use internal JDK apis

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/f2fcd58d/libraries/scripting/src/test/java/org/apache/polygene/library/scripting/ScriptMixinTest.java
----------------------------------------------------------------------
diff --git a/libraries/scripting/src/test/java/org/apache/polygene/library/scripting/ScriptMixinTest.java
b/libraries/scripting/src/test/java/org/apache/polygene/library/scripting/ScriptMixinTest.java
index 8783da7..b23629c 100644
--- a/libraries/scripting/src/test/java/org/apache/polygene/library/scripting/ScriptMixinTest.java
+++ b/libraries/scripting/src/test/java/org/apache/polygene/library/scripting/ScriptMixinTest.java
@@ -78,9 +78,9 @@ public class ScriptMixinTest
         domain2.inc();
         domain2.inc();
         domain3.inc();
-        assertThat(domain1.count(), equalTo(4.0D) );
-        assertThat(domain2.count(), equalTo(3.0D) );
-        assertThat(domain3.count(), equalTo(1.0D) );
+        assertThat(domain1.count(), equalTo(4.0) );
+        assertThat(domain2.count(), equalTo(3.0) );
+        assertThat(domain3.count(), equalTo(1.0) );
     }
 
     @Test

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/f2fcd58d/libraries/sql-generator/src/test/java/org/apache/polygene/library/sql/generator/PostgreSQLDataDefinitionTest.java
----------------------------------------------------------------------
diff --git a/libraries/sql-generator/src/test/java/org/apache/polygene/library/sql/generator/PostgreSQLDataDefinitionTest.java
b/libraries/sql-generator/src/test/java/org/apache/polygene/library/sql/generator/PostgreSQLDataDefinitionTest.java
index 4cc42c1..0a2c3a6 100644
--- a/libraries/sql-generator/src/test/java/org/apache/polygene/library/sql/generator/PostgreSQLDataDefinitionTest.java
+++ b/libraries/sql-generator/src/test/java/org/apache/polygene/library/sql/generator/PostgreSQLDataDefinitionTest.java
@@ -17,8 +17,6 @@ import org.apache.polygene.library.sql.generator.vendor.PostgreSQLVendor;
 import org.apache.polygene.library.sql.generator.vendor.SQLVendor;
 import org.apache.polygene.library.sql.generator.vendor.SQLVendorProvider;
 
-/**
- */
 public class PostgreSQLDataDefinitionTest extends AbstractDataDefinitionTest
 {
     @Override

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/f2fcd58d/libraries/sql-generator/src/test/java/org/apache/polygene/library/sql/generator/PostgreSQLQueryTest.java
----------------------------------------------------------------------
diff --git a/libraries/sql-generator/src/test/java/org/apache/polygene/library/sql/generator/PostgreSQLQueryTest.java
b/libraries/sql-generator/src/test/java/org/apache/polygene/library/sql/generator/PostgreSQLQueryTest.java
index 57a15ab..7c22625 100644
--- a/libraries/sql-generator/src/test/java/org/apache/polygene/library/sql/generator/PostgreSQLQueryTest.java
+++ b/libraries/sql-generator/src/test/java/org/apache/polygene/library/sql/generator/PostgreSQLQueryTest.java
@@ -18,8 +18,6 @@ import org.apache.polygene.library.sql.generator.vendor.PostgreSQLVendor;
 import org.apache.polygene.library.sql.generator.vendor.SQLVendorProvider;
 import org.junit.jupiter.api.Test;
 
-/**
- */
 public class PostgreSQLQueryTest extends AbstractQueryTest
 {
 

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/f2fcd58d/libraries/uid/src/test/java/org/apache/polygene/library/uid/sequence/PersistingSequencingTest.java
----------------------------------------------------------------------
diff --git a/libraries/uid/src/test/java/org/apache/polygene/library/uid/sequence/PersistingSequencingTest.java
b/libraries/uid/src/test/java/org/apache/polygene/library/uid/sequence/PersistingSequencingTest.java
index f25304b..2bfc484 100644
--- a/libraries/uid/src/test/java/org/apache/polygene/library/uid/sequence/PersistingSequencingTest.java
+++ b/libraries/uid/src/test/java/org/apache/polygene/library/uid/sequence/PersistingSequencingTest.java
@@ -47,7 +47,7 @@ public class PersistingSequencingTest extends AbstractPolygeneTest
         throws Exception
     {
         UnderTest underTest = transientBuilderFactory.newTransient( UnderTest.class );
-        assertThat( underTest.currentValue(), equalTo( 0 ) );
+        assertThat( underTest.currentValue(), equalTo( 0L ) );
     }
 
     @Test
@@ -55,8 +55,8 @@ public class PersistingSequencingTest extends AbstractPolygeneTest
         throws Exception
     {
         UnderTest underTest = transientBuilderFactory.newTransient( UnderTest.class );
-        assertThat( underTest.nextValue(), equalTo( 1 ) );
-        assertThat( underTest.currentValue(), equalTo( 1 ) );
+        assertThat( underTest.nextValue(), equalTo( 1L ) );
+        assertThat( underTest.currentValue(), equalTo( 1L ) );
     }
 
     @Test
@@ -64,7 +64,7 @@ public class PersistingSequencingTest extends AbstractPolygeneTest
         throws Exception
     {
         UnderTest underTest = transientBuilderFactory.newTransient( UnderTest.class );
-        for( int i = 1; i <= 100; i++ )
+        for( long i = 1; i <= 100; i++ )
         {
             assertThat( underTest.nextValue(), equalTo( i ) );
             assertThat( underTest.currentValue(), equalTo( i ) );

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/f2fcd58d/libraries/uid/src/test/java/org/apache/polygene/library/uid/sequence/TransientSequencingTest.java
----------------------------------------------------------------------
diff --git a/libraries/uid/src/test/java/org/apache/polygene/library/uid/sequence/TransientSequencingTest.java
b/libraries/uid/src/test/java/org/apache/polygene/library/uid/sequence/TransientSequencingTest.java
index 0d69479..204c5a0 100644
--- a/libraries/uid/src/test/java/org/apache/polygene/library/uid/sequence/TransientSequencingTest.java
+++ b/libraries/uid/src/test/java/org/apache/polygene/library/uid/sequence/TransientSequencingTest.java
@@ -43,27 +43,24 @@ public class TransientSequencingTest extends AbstractPolygeneTest
 
     @Test
     public void whenTransientSequencingThenNumbersStartAtZero()
-        throws Exception
     {
         UnderTest underTest = transientBuilderFactory.newTransient( UnderTest.class );
-        assertThat( underTest.currentValue(), equalTo( 0 ) );
+        assertThat( underTest.currentValue(), equalTo( 0L ) );
     }
 
     @Test
     public void whenTransientSequencingThenFirstNextValueIsOne()
-        throws Exception
     {
         UnderTest underTest = transientBuilderFactory.newTransient( UnderTest.class );
-        assertThat( underTest.nextValue(), equalTo( 1 ) );
-        assertThat( underTest.currentValue(), equalTo( 1 ) );
+        assertThat( underTest.nextValue(), equalTo( 1L ) );
+        assertThat( underTest.currentValue(), equalTo( 1L ) );
     }
 
     @Test
     public void whenTransientSequencingThenFirst100ValuesAreInSequence()
-        throws Exception
     {
         UnderTest underTest = transientBuilderFactory.newTransient( UnderTest.class );
-        for( int i = 1; i <= 100; i++ )
+        for( long i = 1; i <= 100; i++ )
         {
             assertThat( underTest.nextValue(), equalTo( i ) );
             assertThat( underTest.currentValue(), equalTo( i ) );


Mime
View raw message