You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by mp...@apache.org on 2015/12/09 07:10:06 UTC
[2/2] mesos git commit: Shortened `allocation_interval` from 50ms to
5ms in `ReservationTest`s to help expose potential race conditions.
Shortened `allocation_interval` from 50ms to 5ms in `ReservationTest`s
to help expose potential race conditions.
Review: https://reviews.apache.org/r/41000
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/c08bd5d7
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/c08bd5d7
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/c08bd5d7
Branch: refs/heads/master
Commit: c08bd5d7edf10078cd22d29fd9fd46d8e1b21b13
Parents: 48f18e6
Author: Greg Mann <gr...@mesosphere.io>
Authored: Wed Dec 9 01:04:15 2015 -0500
Committer: Michael Park <mp...@apache.org>
Committed: Wed Dec 9 01:04:16 2015 -0500
----------------------------------------------------------------------
src/tests/reservation_tests.cpp | 30 +++++++++++++++---------------
1 file changed, 15 insertions(+), 15 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mesos/blob/c08bd5d7/src/tests/reservation_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/reservation_tests.cpp b/src/tests/reservation_tests.cpp
index f455790..3405b47 100644
--- a/src/tests/reservation_tests.cpp
+++ b/src/tests/reservation_tests.cpp
@@ -82,7 +82,7 @@ TEST_F(ReservationTest, ReserveThenUnreserve)
frameworkInfo.set_role("role");
master::Flags masterFlags = CreateMasterFlags();
- masterFlags.allocation_interval = Milliseconds(50);
+ masterFlags.allocation_interval = Milliseconds(5);
masterFlags.roles = frameworkInfo.role();
Try<PID<Master>> master = StartMaster(masterFlags);
@@ -177,7 +177,7 @@ TEST_F(ReservationTest, ReserveAndLaunchThenUnreserve)
frameworkInfo.set_role("role");
master::Flags masterFlags = CreateMasterFlags();
- masterFlags.allocation_interval = Milliseconds(50);
+ masterFlags.allocation_interval = Milliseconds(5);
masterFlags.roles = frameworkInfo.role();
Try<PID<Master>> master = StartMaster(masterFlags);
@@ -294,7 +294,7 @@ TEST_F(ReservationTest, ReserveShareWithinRole)
frameworkInfo2.set_role(role);
master::Flags masterFlags = CreateMasterFlags();
- masterFlags.allocation_interval = Milliseconds(50);
+ masterFlags.allocation_interval = Milliseconds(5);
masterFlags.roles = role;
Try<PID<Master>> master = StartMaster(masterFlags);
@@ -403,7 +403,7 @@ TEST_F(ReservationTest, DropReserveTooLarge)
frameworkInfo.set_role("role");
master::Flags masterFlags = CreateMasterFlags();
- masterFlags.allocation_interval = Milliseconds(50);
+ masterFlags.allocation_interval = Milliseconds(5);
masterFlags.roles = frameworkInfo.role();
EXPECT_CALL(allocator, initialize(_, _, _, _));
@@ -494,7 +494,7 @@ TEST_F(ReservationTest, DropReserveStaticReservation)
frameworkInfo.set_role("role");
master::Flags masterFlags = CreateMasterFlags();
- masterFlags.allocation_interval = Milliseconds(50);
+ masterFlags.allocation_interval = Milliseconds(5);
masterFlags.roles = frameworkInfo.role();
EXPECT_CALL(allocator, initialize(_, _, _, _));
@@ -583,7 +583,7 @@ TEST_F(ReservationTest, SendingCheckpointResourcesMessage)
frameworkInfo.set_role("role");
master::Flags masterFlags = CreateMasterFlags();
- masterFlags.allocation_interval = Milliseconds(50);
+ masterFlags.allocation_interval = Milliseconds(5);
masterFlags.roles = frameworkInfo.role();
Try<PID<Master>> master = StartMaster(masterFlags);
@@ -683,7 +683,7 @@ TEST_F(ReservationTest, ResourcesCheckpointing)
frameworkInfo.set_role("role");
master::Flags masterFlags = CreateMasterFlags();
- masterFlags.allocation_interval = Milliseconds(50);
+ masterFlags.allocation_interval = Milliseconds(5);
masterFlags.roles = frameworkInfo.role();
Try<PID<Master>> master = StartMaster(masterFlags);
@@ -774,7 +774,7 @@ TEST_F(ReservationTest, MasterFailover)
frameworkInfo.set_role("role");
master::Flags masterFlags = CreateMasterFlags();
- masterFlags.allocation_interval = Milliseconds(50);
+ masterFlags.allocation_interval = Milliseconds(5);
masterFlags.roles = frameworkInfo.role();
Try<PID<Master>> master1 = StartMaster(masterFlags);
@@ -889,7 +889,7 @@ TEST_F(ReservationTest, CompatibleCheckpointedResources)
frameworkInfo.set_role("role");
master::Flags masterFlags = CreateMasterFlags();
- masterFlags.allocation_interval = Milliseconds(50);
+ masterFlags.allocation_interval = Milliseconds(5);
masterFlags.roles = frameworkInfo.role();
Try<PID<Master>> master = StartMaster(masterFlags);
@@ -995,7 +995,7 @@ TEST_F(ReservationTest, CompatibleCheckpointedResourcesWithPersistentVolumes)
frameworkInfo.set_role("role");
master::Flags masterFlags = CreateMasterFlags();
- masterFlags.allocation_interval = Milliseconds(50);
+ masterFlags.allocation_interval = Milliseconds(5);
masterFlags.roles = frameworkInfo.role();
Try<PID<Master>> master = StartMaster(masterFlags);
@@ -1120,7 +1120,7 @@ TEST_F(ReservationTest, IncompatibleCheckpointedResources)
frameworkInfo.set_role("role");
master::Flags masterFlags = CreateMasterFlags();
- masterFlags.allocation_interval = Milliseconds(50);
+ masterFlags.allocation_interval = Milliseconds(5);
masterFlags.roles = frameworkInfo.role();
Try<PID<Master>> master = StartMaster(masterFlags);
@@ -1238,7 +1238,7 @@ TEST_F(ReservationTest, GoodACLReserveThenUnreserve)
// Create a master.
master::Flags masterFlags = CreateMasterFlags();
masterFlags.acls = acls;
- masterFlags.allocation_interval = Milliseconds(50);
+ masterFlags.allocation_interval = Milliseconds(5);
masterFlags.roles = frameworkInfo.role();
Try<PID<Master>> master = StartMaster(masterFlags);
@@ -1338,7 +1338,7 @@ TEST_F(ReservationTest, BadACLDropReserve)
// Create a master.
master::Flags masterFlags = CreateMasterFlags();
masterFlags.acls = acls;
- masterFlags.allocation_interval = Milliseconds(50);
+ masterFlags.allocation_interval = Milliseconds(5);
masterFlags.roles = frameworkInfo.role();
Try<PID<Master>> master = StartMaster(masterFlags);
@@ -1429,7 +1429,7 @@ TEST_F(ReservationTest, BadACLDropUnreserve)
// Create a master.
master::Flags masterFlags = CreateMasterFlags();
masterFlags.acls = acls;
- masterFlags.allocation_interval = Milliseconds(50);
+ masterFlags.allocation_interval = Milliseconds(5);
masterFlags.roles = frameworkInfo.role();
Try<PID<Master>> master = StartMaster(masterFlags);
@@ -1556,7 +1556,7 @@ TEST_F(ReservationTest, ACLMultipleOperations)
// Create a master.
master::Flags masterFlags = CreateMasterFlags();
masterFlags.acls = acls;
- masterFlags.allocation_interval = Milliseconds(50);
+ masterFlags.allocation_interval = Milliseconds(5);
masterFlags.roles = frameworkInfo.role();
Try<PID<Master>> master = StartMaster(masterFlags);