Repository: mesos
Updated Branches:
  refs/heads/master b43bb4fea -> dc4a4ae9b


Speed up reservation test by lowering allocation interval.

ReserveResource test (and UnreserveResource test) in v1 operator
API is very slow, taking more than 1000 ms. If we set allocation
interval in master flag to 50ms and use that flag to start up a
master to use in the test, we can reduce the duration of that test
to as low as 120 ms. So, in this patch we made that change.

Review: https://reviews.apache.org/r/50072/


Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/716108d7
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/716108d7
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/716108d7

Branch: refs/heads/master
Commit: 716108d76b0741dede2167165927a183db548640
Parents: b43bb4f
Author: Abhishek Dasgupta <a10gu...@linux.vnet.ibm.com>
Authored: Tue Jul 19 15:47:23 2016 -0700
Committer: Vinod Kone <vinodk...@gmail.com>
Committed: Tue Jul 19 15:50:36 2016 -0700

----------------------------------------------------------------------
 src/tests/api_tests.cpp | 8 ++++++++
 1 file changed, 8 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/716108d7/src/tests/api_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/api_tests.cpp b/src/tests/api_tests.cpp
index b4bee76..0a3623a 100644
--- a/src/tests/api_tests.cpp
+++ b/src/tests/api_tests.cpp
@@ -92,6 +92,14 @@ class MasterAPITest
     public WithParamInterface<ContentType>
 {
 public:
+  virtual master::Flags CreateMasterFlags()
+  {
+    // Set a low allocation interval to speed up tests.
+    master::Flags flags = MesosTest::CreateMasterFlags();
+    flags.allocation_interval = Milliseconds(50);
+    return flags;
+  }
+
   // Helper function to post a request to "/api/v1" master endpoint and return
   // the response.
   Future<v1::master::Response> post(

Reply via email to