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/26 15:19:19 UTC

[incubator-servicecomb-saga] branch spring-boot-2 updated (332f626 -> 8a29c87)

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

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


    omit 332f626  SCB-429 Upgraded the Spring Boot version to 1.5.10
     add 078fb18  SCB-429 Upgraded the Spring Boot version to 1.5.10
     add 3483937  Added CONTRIBUTING.md
     add d71d1bc  SCB-433 Updated the docker running setting
     new 8a29c87  SCB-410 Alpha Service upgraded to Spring Boot 2.0

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (332f626)
            \
             N -- N -- N   refs/heads/spring-boot-2 (8a29c87)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 1 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:
 CONTRIBUTING.md                                    | 43 ++++++++++++++++++++++
 acceptance-tests/acceptance-pack/pom.xml           | 22 ++++++++++-
 .../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      |  0
 pom.xml                                            |  2 +-
 saga-persistence/saga-persistence-jpa/pom.xml      |  8 ++++
 8 files changed, 120 insertions(+), 6 deletions(-)
 copy {alpha/alpha-server/src/main => integration-tests/pack-tests/src/test}/resources/log4j2.xml (100%)

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

[incubator-servicecomb-saga] 01/01: 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 spring-boot-2
in repository https://gitbox.apache.org/repos/asf/incubator-servicecomb-saga.git

commit 8a29c87e7b8d6a1f16a8c6d3873441c2b70e44ae
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.