You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicecomb.apache.org by ni...@apache.org on 2018/03/27 14:36:45 UTC

[incubator-servicecomb-saga] branch master updated (81d669f -> 79e132c)

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

ningjiang pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-servicecomb-saga.git.


    from 81d669f  SCB-436 Clean up the docker-compose file of booking demo
     new ff73272  SCB-410 Alpha Service upgraded to Spring Boot 2.0
     new d359d59  SCB-410 Fixed the CI build error
     new 79e132c  SCB-410 Support to build demos with Spring Boot 2

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 acceptance-tests/acceptance-pack/pom.xml           | 11 ++++++++++-
 .../org/apache/servicecomb/saga/PackStepdefs.java  | 14 +++++++++++++-
 alpha/alpha-server/pom.xml                         | 19 +++++++++++++++++++
 integration-tests/pack-tests/pom.xml               | 21 ++++++++++++++++++++-
 .../pack-tests/src/test}/resources/log4j2.xml      |  0
 pom.xml                                            |  2 +-
 .../booking/booking}/src/main/resources/log4j2.xml |  0
 .../booking/car}/src/main/resources/log4j2.xml     |  0
 .../booking/hotel}/src/main/resources/log4j2.xml   |  0
 saga-demo/pom.xml                                  | 22 ++++++++++++++++++++++
 saga-persistence/saga-persistence-jpa/pom.xml      |  8 ++++++++
 11 files changed, 93 insertions(+), 4 deletions(-)
 copy {alpha/alpha-server/src/main => integration-tests/pack-tests/src/test}/resources/log4j2.xml (100%)
 copy {alpha/alpha-server => saga-demo/booking/booking}/src/main/resources/log4j2.xml (100%)
 copy {alpha/alpha-server => saga-demo/booking/car}/src/main/resources/log4j2.xml (100%)
 copy {alpha/alpha-server => saga-demo/booking/hotel}/src/main/resources/log4j2.xml (100%)

-- 
To stop receiving notification emails like this one, please contact
ningjiang@apache.org.

[incubator-servicecomb-saga] 03/03: SCB-410 Support to build demos with Spring Boot 2

Posted by ni...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

ningjiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-servicecomb-saga.git

commit 79e132ca5d088f47a659f682411e7d5c08289d40
Author: Willem Jiang <ji...@huawei.com>
AuthorDate: Tue Mar 27 16:31:16 2018 +0800

    SCB-410 Support to build demos with Spring Boot 2
---
 .../org/apache/servicecomb/saga/PackStepdefs.java  | 14 +++++-----
 .../booking/booking/src/main/resources/log4j2.xml  | 30 ++++++++++++++++++++++
 .../booking/car/src/main/resources/log4j2.xml      | 30 ++++++++++++++++++++++
 .../booking/hotel/src/main/resources/log4j2.xml    | 30 ++++++++++++++++++++++
 saga-demo/pom.xml                                  | 22 ++++++++++++++++
 5 files changed, 119 insertions(+), 7 deletions(-)

diff --git a/acceptance-tests/acceptance-pack/src/test/java/org/apache/servicecomb/saga/PackStepdefs.java b/acceptance-tests/acceptance-pack/src/test/java/org/apache/servicecomb/saga/PackStepdefs.java
index 9ba2d75..e256be9 100644
--- a/acceptance-tests/acceptance-pack/src/test/java/org/apache/servicecomb/saga/PackStepdefs.java
+++ b/acceptance-tests/acceptance-pack/src/test/java/org/apache/servicecomb/saga/PackStepdefs.java
@@ -65,12 +65,7 @@ public class PackStepdefs implements En {
     });
 
     And("^Alpha is up and running$", () -> {
-      String infoURI = System.getProperty(INFO_SERVICE_URI);
-      if (isEmpty(infoURI)) {
-        infoURI = "/info";
-      }
-      log.info("The service uri is " + infoURI);
-      probe(System.getProperty(ALPHA_REST_ADDRESS), infoURI);
+      probe(System.getProperty(ALPHA_REST_ADDRESS));
     });
 
     Given("^Install the byteman script ([A-Za-z0-9_\\.]+) to ([A-Za-z]+) Service$", (String script, String service) -> {
@@ -166,7 +161,12 @@ public class PackStepdefs implements En {
   }
 
   private void probe(String address) {
-    probe(address, "/info");
+    String infoURI = System.getProperty(INFO_SERVICE_URI);
+    if (isEmpty(infoURI)) {
+      infoURI = "/info";
+    }
+    log.info("The info service uri is " + infoURI);
+    probe(address, infoURI);
   }
 
   private void probe(String address, String infoURI) {
diff --git a/saga-demo/booking/booking/src/main/resources/log4j2.xml b/saga-demo/booking/booking/src/main/resources/log4j2.xml
new file mode 100644
index 0000000..cae04cb
--- /dev/null
+++ b/saga-demo/booking/booking/src/main/resources/log4j2.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ 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.
+  -->
+
+<Configuration status="WARN">
+  <Appenders>
+    <Console name="Console" target="SYSTEM_OUT">
+      <PatternLayout pattern="%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n"/>
+    </Console>
+  </Appenders>
+  <Loggers>
+    <AsyncRoot level="info">
+      <AppenderRef ref="Console"/>
+    </AsyncRoot>
+  </Loggers>
+</Configuration>
diff --git a/saga-demo/booking/car/src/main/resources/log4j2.xml b/saga-demo/booking/car/src/main/resources/log4j2.xml
new file mode 100644
index 0000000..cae04cb
--- /dev/null
+++ b/saga-demo/booking/car/src/main/resources/log4j2.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ 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.
+  -->
+
+<Configuration status="WARN">
+  <Appenders>
+    <Console name="Console" target="SYSTEM_OUT">
+      <PatternLayout pattern="%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n"/>
+    </Console>
+  </Appenders>
+  <Loggers>
+    <AsyncRoot level="info">
+      <AppenderRef ref="Console"/>
+    </AsyncRoot>
+  </Loggers>
+</Configuration>
diff --git a/saga-demo/booking/hotel/src/main/resources/log4j2.xml b/saga-demo/booking/hotel/src/main/resources/log4j2.xml
new file mode 100644
index 0000000..cae04cb
--- /dev/null
+++ b/saga-demo/booking/hotel/src/main/resources/log4j2.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ 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.
+  -->
+
+<Configuration status="WARN">
+  <Appenders>
+    <Console name="Console" target="SYSTEM_OUT">
+      <PatternLayout pattern="%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n"/>
+    </Console>
+  </Appenders>
+  <Loggers>
+    <AsyncRoot level="info">
+      <AppenderRef ref="Console"/>
+    </AsyncRoot>
+  </Loggers>
+</Configuration>
diff --git a/saga-demo/pom.xml b/saga-demo/pom.xml
index 804f536..7b0e734 100644
--- a/saga-demo/pom.xml
+++ b/saga-demo/pom.xml
@@ -111,4 +111,26 @@
     </plugins>
   </build>
 
+  <profiles>
+    <profile>
+      <id>spring-boot-2</id>
+      <properties>
+        <spring.boot.version>2.0.0.RELEASE</spring.boot.version>
+      </properties>
+      <!-- Need to add the dependency of log4j2 core -->
+      <dependencies>
+        <dependency>
+          <groupId>org.apache.logging.log4j</groupId>
+          <artifactId>log4j-core</artifactId>
+          <version>2.6.2</version>
+        </dependency>
+        <dependency>
+          <groupId>com.lmax</groupId>
+          <artifactId>disruptor</artifactId>
+          <version>3.3.7</version>
+        </dependency>
+    </dependencies>
+    </profile>
+  </profiles>
+
 </project>

-- 
To stop receiving notification emails like this one, please contact
ningjiang@apache.org.

[incubator-servicecomb-saga] 01/03: SCB-410 Alpha Service upgraded to Spring Boot 2.0

Posted by ni...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

ningjiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-servicecomb-saga.git

commit ff732723684775ab53670881f75a7b179b62616f
Author: Willem Jiang <ji...@huawei.com>
AuthorDate: Mon Mar 26 23:18:26 2018 +0800

    SCB-410 Alpha Service upgraded to Spring Boot 2.0
---
 acceptance-tests/acceptance-pack/pom.xml           | 11 +++++++-
 .../org/apache/servicecomb/saga/PackStepdefs.java  | 11 ++++++--
 alpha/alpha-server/pom.xml                         | 19 ++++++++++++++
 integration-tests/pack-tests/pom.xml               | 21 ++++++++++++++-
 .../pack-tests/src/test/resources/log4j2.xml       | 30 ++++++++++++++++++++++
 pom.xml                                            |  2 +-
 saga-persistence/saga-persistence-jpa/pom.xml      |  8 ++++++
 7 files changed, 97 insertions(+), 5 deletions(-)

diff --git a/acceptance-tests/acceptance-pack/pom.xml b/acceptance-tests/acceptance-pack/pom.xml
index aaae3fb..7baba71 100644
--- a/acceptance-tests/acceptance-pack/pom.xml
+++ b/acceptance-tests/acceptance-pack/pom.xml
@@ -86,7 +86,7 @@
                   <run>
                     <env>
                       <JAVA_OPTS>
-                        -Dspring.profiles.active=prd
+                        -Dspring.profiles.active=prd -Dspring.datasource.initialization-mode=always
                       </JAVA_OPTS>
                     </env>
                     <links>
@@ -283,6 +283,9 @@
                 <booking.byteman.port>
                   ${booking.byteman.port}
                 </booking.byteman.port>
+                <info.service.uri>
+                  ${info.service.uri}
+                </info.service.uri>
               </systemPropertyVariables>
               <argLine>${jacoco.failsafe.argLine}</argLine>
             </configuration>
@@ -331,6 +334,12 @@
         </plugins>
       </build>
     </profile>
+    <profile>
+      <id>spring-boot-2</id>
+      <properties>
+        <info.service.uri>/actuator/info</info.service.uri>
+      </properties>
+    </profile>
   </profiles>
 
 </project>
diff --git a/acceptance-tests/acceptance-pack/src/test/java/org/apache/servicecomb/saga/PackStepdefs.java b/acceptance-tests/acceptance-pack/src/test/java/org/apache/servicecomb/saga/PackStepdefs.java
index 2646b1b..8d166ad 100644
--- a/acceptance-tests/acceptance-pack/src/test/java/org/apache/servicecomb/saga/PackStepdefs.java
+++ b/acceptance-tests/acceptance-pack/src/test/java/org/apache/servicecomb/saga/PackStepdefs.java
@@ -44,6 +44,7 @@ public class PackStepdefs implements En {
   private static final String CAR_SERVICE_ADDRESS = "car.service.address";
   private static final String HOTEL_SERVICE_ADDRESS = "hotel.service.address";
   private static final String BOOKING_SERVICE_ADDRESS = "booking.service.address";
+  private static final String INFO_SERVICE_URI = "info.service.uri";
   private static final String[] addresses = {CAR_SERVICE_ADDRESS, HOTEL_SERVICE_ADDRESS};
 
   private static final Consumer<Map<String, String>[]> NO_OP_CONSUMER = (dataMap) -> {
@@ -63,7 +64,8 @@ public class PackStepdefs implements En {
     });
 
     And("^Alpha is up and running$", () -> {
-      probe(System.getProperty(ALPHA_REST_ADDRESS));
+      String infoURI = System.getProperty(INFO_SERVICE_URI, "/info");
+      probe(System.getProperty(ALPHA_REST_ADDRESS), infoURI);
     });
 
     Given("^Install the byteman script ([A-Za-z0-9_\\.]+) to ([A-Za-z]+) Service$", (String script, String service) -> {
@@ -159,11 +161,16 @@ public class PackStepdefs implements En {
   }
 
   private void probe(String address) {
+    probe(address, "/info");
+  }
+
+  private void probe(String address, String infoURI) {
     log.info("Connecting to service address {}", address);
     given()
         .when()
-        .get(address + "/info")
+        .get(address + infoURI)
         .then()
         .statusCode(is(200));
   }
+
 }
diff --git a/alpha/alpha-server/pom.xml b/alpha/alpha-server/pom.xml
index bfb3b20..857068e 100644
--- a/alpha/alpha-server/pom.xml
+++ b/alpha/alpha-server/pom.xml
@@ -167,5 +167,24 @@
         </plugins>
       </build>
     </profile>
+    <profile>
+      <id>spring-boot-2</id>
+      <properties>
+        <spring.boot.version>2.0.0.RELEASE</spring.boot.version>
+      </properties>
+      <!-- Need to add the dependency of log4j2 core -->
+      <dependencies>
+        <dependency>
+          <groupId>org.apache.logging.log4j</groupId>
+          <artifactId>log4j-core</artifactId>
+          <version>2.6.2</version>
+        </dependency>
+        <dependency>
+          <groupId>com.lmax</groupId>
+          <artifactId>disruptor</artifactId>
+          <version>3.3.7</version>
+        </dependency>
+      </dependencies>
+    </profile>
   </profiles>
 </project>
diff --git a/integration-tests/pack-tests/pom.xml b/integration-tests/pack-tests/pom.xml
index 0ff8f8d..e018425 100644
--- a/integration-tests/pack-tests/pom.xml
+++ b/integration-tests/pack-tests/pom.xml
@@ -130,6 +130,25 @@
 
   <profiles>
     <profile>
+      <id>spring-boot-2</id>
+      <properties>
+        <spring.boot.version>2.0.0.RELEASE</spring.boot.version>
+      </properties>
+      <!-- Need to add the dependency of log4j2 core -->
+      <dependencies>
+        <dependency>
+          <groupId>org.apache.logging.log4j</groupId>
+          <artifactId>log4j-core</artifactId>
+          <version>2.6.2</version>
+        </dependency>
+        <dependency>
+          <groupId>com.lmax</groupId>
+          <artifactId>disruptor</artifactId>
+          <version>3.3.7</version>
+        </dependency>
+      </dependencies>
+    </profile>
+    <profile>
       <id>docker</id>
       <build>
         <plugins>
@@ -167,7 +186,7 @@
                   <run>
                     <env>
                       <JAVA_OPTS>
-                        -Dspring.profiles.active=prd
+                        -Dspring.profiles.active=prd -Dspring.datasource.initialization-mode=always
                       </JAVA_OPTS>
                     </env>
                     <links>
diff --git a/integration-tests/pack-tests/src/test/resources/log4j2.xml b/integration-tests/pack-tests/src/test/resources/log4j2.xml
new file mode 100644
index 0000000..cae04cb
--- /dev/null
+++ b/integration-tests/pack-tests/src/test/resources/log4j2.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ 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.
+  -->
+
+<Configuration status="WARN">
+  <Appenders>
+    <Console name="Console" target="SYSTEM_OUT">
+      <PatternLayout pattern="%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n"/>
+    </Console>
+  </Appenders>
+  <Loggers>
+    <AsyncRoot level="info">
+      <AppenderRef ref="Console"/>
+    </AsyncRoot>
+  </Loggers>
+</Configuration>
diff --git a/pom.xml b/pom.xml
index ba304d5..3a0194d 100755
--- a/pom.xml
+++ b/pom.xml
@@ -366,7 +366,7 @@
       <dependency>
         <groupId>org.mockito</groupId>
         <artifactId>mockito-core</artifactId>
-        <version>1.10.19</version>
+        <version>2.16.0</version>
         <scope>test</scope>
       </dependency>
       <dependency>
diff --git a/saga-persistence/saga-persistence-jpa/pom.xml b/saga-persistence/saga-persistence-jpa/pom.xml
index 52d999d..f3c1cc2 100644
--- a/saga-persistence/saga-persistence-jpa/pom.xml
+++ b/saga-persistence/saga-persistence-jpa/pom.xml
@@ -85,5 +85,13 @@
       </plugin>
     </plugins>
   </build>
+  <profiles>
+    <profile>
+      <id>spring-boot-2</id>
+      <properties>
+        <spring.boot.version>2.0.0.RELEASE</spring.boot.version>
+      </properties>
+    </profile>
+  </profiles>
 
 </project>

-- 
To stop receiving notification emails like this one, please contact
ningjiang@apache.org.

[incubator-servicecomb-saga] 02/03: SCB-410 Fixed the CI build error

Posted by ni...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

ningjiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-servicecomb-saga.git

commit d359d599a37a50df5c573a52ff6a16c4dca53207
Author: Willem Jiang <ji...@huawei.com>
AuthorDate: Tue Mar 27 06:49:19 2018 +0800

    SCB-410 Fixed the CI build error
---
 .../src/test/java/org/apache/servicecomb/saga/PackStepdefs.java    | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/acceptance-tests/acceptance-pack/src/test/java/org/apache/servicecomb/saga/PackStepdefs.java b/acceptance-tests/acceptance-pack/src/test/java/org/apache/servicecomb/saga/PackStepdefs.java
index 8d166ad..9ba2d75 100644
--- a/acceptance-tests/acceptance-pack/src/test/java/org/apache/servicecomb/saga/PackStepdefs.java
+++ b/acceptance-tests/acceptance-pack/src/test/java/org/apache/servicecomb/saga/PackStepdefs.java
@@ -19,6 +19,7 @@ package org.apache.servicecomb.saga;
 
 import static io.restassured.RestAssured.given;
 import static java.util.concurrent.TimeUnit.SECONDS;
+import static org.apache.commons.lang3.StringUtils.isEmpty;
 import static org.awaitility.Awaitility.await;
 import static org.hamcrest.core.Is.is;
 
@@ -64,7 +65,11 @@ public class PackStepdefs implements En {
     });
 
     And("^Alpha is up and running$", () -> {
-      String infoURI = System.getProperty(INFO_SERVICE_URI, "/info");
+      String infoURI = System.getProperty(INFO_SERVICE_URI);
+      if (isEmpty(infoURI)) {
+        infoURI = "/info";
+      }
+      log.info("The service uri is " + infoURI);
       probe(System.getProperty(ALPHA_REST_ADDRESS), infoURI);
     });
 

-- 
To stop receiving notification emails like this one, please contact
ningjiang@apache.org.