You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@bookkeeper.apache.org by eo...@apache.org on 2018/06/14 14:57:52 UTC

[bookkeeper] branch master updated: Move TimedOutTestsListener from dlog to bookkeeper-common

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

eolivelli pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/bookkeeper.git


The following commit(s) were added to refs/heads/master by this push:
     new c5a3621  Move TimedOutTestsListener from dlog to bookkeeper-common
c5a3621 is described below

commit c5a36219bbb7cfce343137bf3c361f7eb80bd64e
Author: Sijie Guo <si...@apache.org>
AuthorDate: Thu Jun 14 16:57:33 2018 +0200

    Move TimedOutTestsListener from dlog to bookkeeper-common
    
    Descriptions of the changes in this PR:
    
    This PR is to debug CI problems observed at #1516
    
    ### Motivation
    
    dlog uses a `TimedOutTestsListener` to dump the jvm stack when a junit test timed out.
    move this class to bookkeeper-common and built with `test-jar`, so it can be used across the project.
    
    ### Changes
    
    relocate `TimedOutTestsListener` and its related classes from distributedlog-common to bookkeeper-common.
    
    Related Issue: #1516
    
    Author: Sijie Guo <si...@apache.org>
    
    Reviewers: Enrico Olivelli <eo...@gmail.com>
    
    This closes #1517 from sijie/add_test_timedout_listener
---
 .../testing}/util/TestTimedOutTestsListener.java   | 15 +++++++-------
 .../testing}/util/TimedOutTestsListener.java       | 17 ++++++++--------
 .../common/testing/util/package-info.java          | 23 ++++++++++++++++++++++
 bookkeeper-server/pom.xml                          | 18 +++++++++++++++++
 stream/distributedlog/core/pom.xml                 |  2 +-
 5 files changed, 59 insertions(+), 16 deletions(-)

diff --git a/stream/distributedlog/common/src/test/java/org/apache/distributedlog/common/util/TestTimedOutTestsListener.java b/bookkeeper-common/src/test/java/org/apache/bookkeeper/common/testing/util/TestTimedOutTestsListener.java
similarity index 92%
rename from stream/distributedlog/common/src/test/java/org/apache/distributedlog/common/util/TestTimedOutTestsListener.java
rename to bookkeeper-common/src/test/java/org/apache/bookkeeper/common/testing/util/TestTimedOutTestsListener.java
index d38fcdf..09f2ca5 100644
--- a/stream/distributedlog/common/src/test/java/org/apache/distributedlog/common/util/TestTimedOutTestsListener.java
+++ b/bookkeeper-common/src/test/java/org/apache/bookkeeper/common/testing/util/TestTimedOutTestsListener.java
@@ -7,15 +7,16 @@
  * "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
+ *   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.
+ * 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.distributedlog.common.util;
+package org.apache.bookkeeper.common.testing.util;
 
 import java.io.PrintWriter;
 import java.io.StringWriter;
diff --git a/stream/distributedlog/common/src/test/java/org/apache/distributedlog/common/util/TimedOutTestsListener.java b/bookkeeper-common/src/test/java/org/apache/bookkeeper/common/testing/util/TimedOutTestsListener.java
similarity index 93%
rename from stream/distributedlog/common/src/test/java/org/apache/distributedlog/common/util/TimedOutTestsListener.java
rename to bookkeeper-common/src/test/java/org/apache/bookkeeper/common/testing/util/TimedOutTestsListener.java
index 1f61038..e6f8fe4 100644
--- a/stream/distributedlog/common/src/test/java/org/apache/distributedlog/common/util/TimedOutTestsListener.java
+++ b/bookkeeper-common/src/test/java/org/apache/bookkeeper/common/testing/util/TimedOutTestsListener.java
@@ -1,4 +1,4 @@
-/**
+/*
  * 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
@@ -7,15 +7,16 @@
  * "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
+ *   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.
+ * 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.distributedlog.common.util;
+package org.apache.bookkeeper.common.testing.util;
 
 import java.io.PrintWriter;
 import java.io.StringWriter;
diff --git a/bookkeeper-common/src/test/java/org/apache/bookkeeper/common/testing/util/package-info.java b/bookkeeper-common/src/test/java/org/apache/bookkeeper/common/testing/util/package-info.java
new file mode 100644
index 0000000..310961d
--- /dev/null
+++ b/bookkeeper-common/src/test/java/org/apache/bookkeeper/common/testing/util/package-info.java
@@ -0,0 +1,23 @@
+/*
+ * 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.
+ */
+
+/**
+ * Common testing related utils.
+ */
+package org.apache.bookkeeper.common.testing.util;
\ No newline at end of file
diff --git a/bookkeeper-server/pom.xml b/bookkeeper-server/pom.xml
index 85f5bd6..89f2881 100644
--- a/bookkeeper-server/pom.xml
+++ b/bookkeeper-server/pom.xml
@@ -185,6 +185,24 @@
       </plugin>
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-surefire-plugin</artifactId>
+        <version>${maven-surefire-plugin.version}</version>
+        <configuration>
+          <argLine>-Xmx2G -Djava.net.preferIPv4Stack=true</argLine>
+          <redirectTestOutputToFile>${redirectTestOutputToFile}</redirectTestOutputToFile>
+          <reuseForks>false</reuseForks>
+          <forkedProcessTimeoutInSeconds>1800</forkedProcessTimeoutInSeconds>
+          <rerunFailingTestsCount>2</rerunFailingTestsCount>
+          <properties>
+            <property>
+              <name>listener</name>
+              <value>org.apache.bookkeeper.common.testing.util.TimedOutTestsListener</value>
+            </property>
+          </properties>
+        </configuration>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-javadoc-plugin</artifactId>
         <version>${maven-javadoc-plugin.version}</version>
         <configuration>
diff --git a/stream/distributedlog/core/pom.xml b/stream/distributedlog/core/pom.xml
index 8140eea..ce70094 100644
--- a/stream/distributedlog/core/pom.xml
+++ b/stream/distributedlog/core/pom.xml
@@ -104,7 +104,7 @@
           <properties>
             <property>
               <name>listener</name>
-              <value>org.apache.distributedlog.common.util.TimedOutTestsListener</value>
+              <value>org.apache.bookkeeper.common.testing.util.TimedOutTestsListener</value>
             </property>
           </properties>
         </configuration>

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