You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@isis.apache.org by ah...@apache.org on 2019/09/29 17:50:20 UTC

[isis] branch v2 updated: ISIS-2158: fixes all core tests; maven core standard build works

This is an automated email from the ASF dual-hosted git repository.

ahuber pushed a commit to branch v2
in repository https://gitbox.apache.org/repos/asf/isis.git


The following commit(s) were added to refs/heads/v2 by this push:
     new 6e9bd94  ISIS-2158: fixes all core tests; maven core standard build works
6e9bd94 is described below

commit 6e9bd9468074e1e129acd0528c5f7246dad6a074
Author: Andi Huber <ah...@apache.org>
AuthorDate: Sun Sep 29 19:50:12 2019 +0200

    ISIS-2158: fixes all core tests; maven core standard build works
---
 ...eptionRecognizerCompositeForJdoObjectStore.java |  1 -
 ...onRecognizerCompositeForJdoObjectStoreTest.java | 22 +++++++++++++++++-----
 .../java/org/apache/isis/testdomain/jdo/Book.java  |  3 ++-
 .../testdomain/auditing/AuditerServiceTest.java    |  2 +-
 .../publishing/PublisherServiceTest.java           |  2 +-
 5 files changed, 21 insertions(+), 9 deletions(-)

diff --git a/core/plugins/jdo/common/src/main/java/org/apache/isis/jdo/exceprecog/ExceptionRecognizerCompositeForJdoObjectStore.java b/core/plugins/jdo/common/src/main/java/org/apache/isis/jdo/exceprecog/ExceptionRecognizerCompositeForJdoObjectStore.java
index 9770602..e054b71 100644
--- a/core/plugins/jdo/common/src/main/java/org/apache/isis/jdo/exceprecog/ExceptionRecognizerCompositeForJdoObjectStore.java
+++ b/core/plugins/jdo/common/src/main/java/org/apache/isis/jdo/exceprecog/ExceptionRecognizerCompositeForJdoObjectStore.java
@@ -26,7 +26,6 @@ import org.apache.isis.applib.annotation.NatureOfService;
 import org.apache.isis.applib.services.exceprecog.ExceptionRecognizer;
 import org.apache.isis.applib.services.exceprecog.ExceptionRecognizerComposite;
 import org.apache.isis.config.IsisConfiguration;
-import org.apache.isis.config.internal._Config;
 
 /**
  * Convenience implementation of the {@link ExceptionRecognizer} domain service that
diff --git a/core/plugins/jdo/common/src/test/java/org/apache/isis/jdo/exceprecog/ExceptionRecognizerCompositeForJdoObjectStoreTest.java b/core/plugins/jdo/common/src/test/java/org/apache/isis/jdo/exceprecog/ExceptionRecognizerCompositeForJdoObjectStoreTest.java
index 4174e5a..1861bc4 100644
--- a/core/plugins/jdo/common/src/test/java/org/apache/isis/jdo/exceprecog/ExceptionRecognizerCompositeForJdoObjectStoreTest.java
+++ b/core/plugins/jdo/common/src/test/java/org/apache/isis/jdo/exceprecog/ExceptionRecognizerCompositeForJdoObjectStoreTest.java
@@ -21,11 +21,14 @@ package org.apache.isis.jdo.exceprecog;
 import org.junit.Before;
 import org.junit.Test;
 
+import org.apache.isis.config.IsisConfiguration;
 import org.apache.isis.config.internal._Config;
 
 import static org.hamcrest.Matchers.is;
 import static org.junit.Assert.assertThat;
 
+import lombok.val;
+
 public class ExceptionRecognizerCompositeForJdoObjectStoreTest {
 
     private boolean[] called;
@@ -42,22 +45,26 @@ public class ExceptionRecognizerCompositeForJdoObjectStoreTest {
             }
         };
     }
-
+    
     @Test
-    public void whenDisabledFlagNotSet() throws Exception {
+    public void whenDisabledFlagDefaults() throws Exception {
+
         // when
+        val config = new IsisConfiguration();
+        recog.configuration = config;
         recog.init();
 
         // then
         assertThat(called[0], is(true));
     }
 
-
     @Test
     public void whenDisabledFlagSetToTrue() throws Exception {
 
         // when
-        _Config.put("isis.services.ExceptionRecognizerCompositeForJdoObjectStore.disable", true);
+        val config = new IsisConfiguration();
+        config.getServices().getExceptionRecognizerCompositeForJdoObjectStore().setDisable(true);
+        recog.configuration = config;
         recog.init();
 
         // then
@@ -66,12 +73,17 @@ public class ExceptionRecognizerCompositeForJdoObjectStoreTest {
 
     @Test
     public void whenDisabledFlagSetToFalse() throws Exception {
+        
         // when
-        _Config.put("isis.services.ExceptionRecognizerCompositeForJdoObjectStore.disable", false);
+        val config = new IsisConfiguration();
+        config.getServices().getExceptionRecognizerCompositeForJdoObjectStore().setDisable(false);
+        recog.configuration = config;
         recog.init();
 
         // then
         assertThat(called[0], is(true));
     }
+    
+     
 
 }
\ No newline at end of file
diff --git a/examples/smoketests/src/main/java/org/apache/isis/testdomain/jdo/Book.java b/examples/smoketests/src/main/java/org/apache/isis/testdomain/jdo/Book.java
index b715ac5..74ac494 100644
--- a/examples/smoketests/src/main/java/org/apache/isis/testdomain/jdo/Book.java
+++ b/examples/smoketests/src/main/java/org/apache/isis/testdomain/jdo/Book.java
@@ -24,6 +24,7 @@ import javax.jdo.annotations.Inheritance;
 import javax.jdo.annotations.InheritanceStrategy;
 import javax.jdo.annotations.PersistenceCapable;
 
+import org.apache.isis.applib.annotation.Auditing;
 import org.apache.isis.applib.annotation.DomainObject;
 import org.apache.isis.applib.annotation.Property;
 import org.apache.isis.applib.annotation.Publishing;
@@ -35,7 +36,7 @@ import lombok.ToString;
 @PersistenceCapable
 @Inheritance(strategy=InheritanceStrategy.SUPERCLASS_TABLE)
 @Discriminator(value="Book")
-@DomainObject(publishing=Publishing.ENABLED)
+@DomainObject(publishing=Publishing.ENABLED, auditing = Auditing.ENABLED)
 @ToString(callSuper = true)
 public class Book extends Product {
 
diff --git a/examples/smoketests/src/test/java/org/apache/isis/testdomain/auditing/AuditerServiceTest.java b/examples/smoketests/src/test/java/org/apache/isis/testdomain/auditing/AuditerServiceTest.java
index a794742..2a6f281 100644
--- a/examples/smoketests/src/test/java/org/apache/isis/testdomain/auditing/AuditerServiceTest.java
+++ b/examples/smoketests/src/test/java/org/apache/isis/testdomain/auditing/AuditerServiceTest.java
@@ -109,7 +109,7 @@ class AuditerServiceTest {
     }
 
     @Test
-    void auditerServiceShouldBeAwareOfInventoryChanges_whenUsingBackgroundService() 
+    void auditerServiceShouldBeAwareOfInventoryChanges_whenUsingAsyncExecution() 
             throws InterruptedException, ExecutionException, TimeoutException {
 
         // given
diff --git a/examples/smoketests/src/test/java/org/apache/isis/testdomain/publishing/PublisherServiceTest.java b/examples/smoketests/src/test/java/org/apache/isis/testdomain/publishing/PublisherServiceTest.java
index 572a6d8..7ae52d1 100644
--- a/examples/smoketests/src/test/java/org/apache/isis/testdomain/publishing/PublisherServiceTest.java
+++ b/examples/smoketests/src/test/java/org/apache/isis/testdomain/publishing/PublisherServiceTest.java
@@ -106,7 +106,7 @@ class PublisherServiceTest {
     }
 
     @Test @Order(2)
-    void publisherServiceShouldBeAwareOfInventoryChanges_whenUsingBackgroundService() 
+    void publisherServiceShouldBeAwareOfInventoryChanges_whenUsingAsyncExecution() 
             throws InterruptedException, ExecutionException, TimeoutException {
 
         // given