You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by ti...@apache.org on 2015/08/16 19:52:32 UTC
[1/2] mesos git commit: Fixed flaky ExamplesTest.JavaLog.
Repository: mesos
Updated Branches:
refs/heads/master 9b78b3014 -> 7e631d612
Fixed flaky ExamplesTest.JavaLog.
Review: https://reviews.apache.org/r/37414
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/554bd8d9
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/554bd8d9
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/554bd8d9
Branch: refs/heads/master
Commit: 554bd8d96e3d006f528b149adadff96554dc644e
Parents: 9b78b30
Author: Greg Mann <gr...@mesosphere.io>
Authored: Sun Aug 16 19:13:26 2015 +0200
Committer: Till Toenshoff <to...@me.com>
Committed: Sun Aug 16 19:13:27 2015 +0200
----------------------------------------------------------------------
src/examples/java/TestLog.java | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mesos/blob/554bd8d9/src/examples/java/TestLog.java
----------------------------------------------------------------------
diff --git a/src/examples/java/TestLog.java b/src/examples/java/TestLog.java
index 9dd4630..8fa8158 100644
--- a/src/examples/java/TestLog.java
+++ b/src/examples/java/TestLog.java
@@ -108,10 +108,20 @@ public class TestLog {
return p.exitValue();
}
- private static void exit(int status) {
+ private static void exit(int status) throws Exception {
if (zkserver != null) {
zkserver.stop();
}
+ // For this test to pass reliably on some platforms, this sleep is
+ // required to ensure that the test server shutdown is complete
+ // before the JVM starts running native object destructors after
+ // System.exit() is called. 500ms proved successful in test runs,
+ // but on a heavily-loaded machine it might not.
+ // TODO(greg): Ideally, we would inspect the status of the server
+ // via the Java API and wait until its teardown is complete to
+ // exit.
+ Thread.sleep(500);
+
System.exit(status);
}
[2/2] mesos git commit: Fixed flaky ExamplesTest.JavaFramework.
Posted by ti...@apache.org.
Fixed flaky ExamplesTest.JavaFramework.
Review: https://reviews.apache.org/r/37415
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/7e631d61
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/7e631d61
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/7e631d61
Branch: refs/heads/master
Commit: 7e631d612896cd1b8d4de46ff500677de9c63900
Parents: 554bd8d
Author: Greg Mann <gr...@mesosphere.io>
Authored: Sun Aug 16 19:13:56 2015 +0200
Committer: Till Toenshoff <to...@me.com>
Committed: Sun Aug 16 19:13:56 2015 +0200
----------------------------------------------------------------------
src/examples/java/TestFramework.java | 10 ++++++++++
1 file changed, 10 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mesos/blob/7e631d61/src/examples/java/TestFramework.java
----------------------------------------------------------------------
diff --git a/src/examples/java/TestFramework.java b/src/examples/java/TestFramework.java
index 265005b..aad94c0 100644
--- a/src/examples/java/TestFramework.java
+++ b/src/examples/java/TestFramework.java
@@ -268,6 +268,16 @@ public class TestFramework {
// Ensure that the driver process terminates.
driver.stop();
+ // For this test to pass reliably on some platforms, this sleep is
+ // required to ensure that the SchedulerDriver teardown is complete
+ // before the JVM starts running native object destructors after
+ // System.exit() is called. 500ms proved successful in test runs,
+ // but on a heavily-loaded machine it might not.
+ // TODO(greg): Ideally, we would inspect the status of the driver
+ // and its associated tasks via the Java API and wait until their
+ // teardown is complete to exit.
+ Thread.sleep(500);
+
System.exit(status);
}
}