geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kl...@apache.org
Subject geode git commit: GEODE-3461: GEODE-3505: mark test with FlakyTest category
Date Fri, 25 Aug 2017 17:17:41 GMT
Repository: geode
Updated Branches:
  refs/heads/develop d775dfb3b -> 4ea83c373


GEODE-3461: GEODE-3505: mark test with FlakyTest category

* also increase timeout to wait for process to die


Project: http://git-wip-us.apache.org/repos/asf/geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/geode/commit/4ea83c37
Tree: http://git-wip-us.apache.org/repos/asf/geode/tree/4ea83c37
Diff: http://git-wip-us.apache.org/repos/asf/geode/diff/4ea83c37

Branch: refs/heads/develop
Commit: 4ea83c373ac618bb4e6c248ada559e46426e8b99
Parents: d775dfb
Author: Kirk Lund <klund@apache.org>
Authored: Thu Aug 24 16:03:51 2017 -0700
Committer: Kirk Lund <klund@apache.org>
Committed: Fri Aug 25 10:17:33 2017 -0700

----------------------------------------------------------------------
 .../process/AbstractProcessStreamReaderIntegrationTest.java  | 8 +++++++-
 .../process/BaseProcessStreamReaderIntegrationTest.java      | 8 +++++++-
 2 files changed, 14 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/geode/blob/4ea83c37/geode-core/src/test/java/org/apache/geode/internal/process/AbstractProcessStreamReaderIntegrationTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/internal/process/AbstractProcessStreamReaderIntegrationTest.java
b/geode-core/src/test/java/org/apache/geode/internal/process/AbstractProcessStreamReaderIntegrationTest.java
index 7f4d60a..c8437fe 100755
--- a/geode-core/src/test/java/org/apache/geode/internal/process/AbstractProcessStreamReaderIntegrationTest.java
+++ b/geode-core/src/test/java/org/apache/geode/internal/process/AbstractProcessStreamReaderIntegrationTest.java
@@ -26,6 +26,7 @@ import java.io.InputStream;
 import java.io.UncheckedIOException;
 import java.util.ArrayList;
 import java.util.List;
+import java.util.concurrent.TimeUnit;
 
 import org.awaitility.Awaitility;
 import org.awaitility.core.ConditionFactory;
@@ -44,7 +45,7 @@ public abstract class AbstractProcessStreamReaderIntegrationTest {
   private static final int READER_JOIN_TIMEOUT_MILLIS = 2 * 60 * 1000;
 
   /** Sleep timeout for {@link ProcessSleeps} instead of sleeping Long.MAX_VALUE */
-  private static final int PROCESS_FAIL_SAFE_TIMEOUT_MILLIS = 10 * 60 * 1000;
+  private static final int PROCESS_FAIL_SAFE_TIMEOUT_MILLIS = 8 * 60 * 1000;
 
   /** Additional time for launched processes to live before terminating */
   private static final int PROCESS_TIME_TO_LIVE_MILLIS = 3 * 500;
@@ -167,6 +168,11 @@ public abstract class AbstractProcessStreamReaderIntegrationTest {
     await().until(() -> assertThat(isProcessAlive(process)).isFalse());
   }
 
+  protected void waitUntilProcessStops(final long timeout, final TimeUnit unit) {
+    Awaitility.await().atMost(2, MINUTES)
+        .until(() -> assertThat(isProcessAlive(process)).isFalse());
+  }
+
   private ProcessStreamReader buildProcessStreamReader(final InputStream stream,
       final ReadingMode mode) {
     return new ProcessStreamReader.Builder(process).inputStream(stream).readingMode(mode).build()

http://git-wip-us.apache.org/repos/asf/geode/blob/4ea83c37/geode-core/src/test/java/org/apache/geode/internal/process/BaseProcessStreamReaderIntegrationTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/internal/process/BaseProcessStreamReaderIntegrationTest.java
b/geode-core/src/test/java/org/apache/geode/internal/process/BaseProcessStreamReaderIntegrationTest.java
index 1aa93bb..34fa145 100644
--- a/geode-core/src/test/java/org/apache/geode/internal/process/BaseProcessStreamReaderIntegrationTest.java
+++ b/geode-core/src/test/java/org/apache/geode/internal/process/BaseProcessStreamReaderIntegrationTest.java
@@ -14,7 +14,12 @@
  */
 package org.apache.geode.internal.process;
 
+import static java.util.concurrent.TimeUnit.MINUTES;
+
 import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
+import org.apache.geode.test.junit.categories.FlakyTest;
 
 /**
  * Integration tests that should be executed under both {@link ProcessStreamReader.ReadingMode}s.
@@ -37,6 +42,7 @@ public abstract class BaseProcessStreamReaderIntegrationTest
   }
 
   @Test
+  @Category(FlakyTest.class) // GEODE-3461 and GEODE-3505
   public void processTerminatesWhenDestroyed() throws Exception {
     // arrange
     givenRunningProcessWithStreamReaders(ProcessSleeps.class);
@@ -45,7 +51,7 @@ public abstract class BaseProcessStreamReaderIntegrationTest
     process.destroy(); // results in SIGTERM which usually has an exit code of 143
 
     // assert
-    waitUntilProcessStops();
+    waitUntilProcessStops(10, MINUTES);
     assertThatProcessAndReadersDied();
   }
 }


Mime
View raw message