Skip to content

Commit

Permalink
For testing MESOS-8630.
Browse files Browse the repository at this point in the history
  • Loading branch information
xujyan committed May 4, 2018
1 parent f0e3d3a commit 6805132
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/tests/master_maintenance_tests.cpp
Expand Up @@ -25,6 +25,8 @@

#include <mesos/v1/scheduler/scheduler.hpp>

#include <messages/log.hpp>

#include <process/clock.hpp>
#include <process/future.hpp>
#include <process/http.hpp>
Expand Down Expand Up @@ -58,6 +60,8 @@

using google::protobuf::RepeatedPtrField;

using mesos::internal::log::WriteResponse;

using mesos::internal::master::Master;

using mesos::internal::master::allocator::MesosAllocatorProcess;
Expand Down Expand Up @@ -157,7 +161,11 @@ class MasterMaintenanceTest : public MesosTest
TEST_F(MasterMaintenanceTest, UpdateSchedule)
{
// Set up a master.
Try<Owned<cluster::Master>> master = StartMaster();
master::Flags flags = CreateMasterFlags();
flags.registry = "replicated_log";
flags.registry_store_timeout = Seconds(5);

Try<Owned<cluster::Master>> master = StartMaster(flags);
ASSERT_SOME(master);

// Extra machine used in this test.
Expand Down Expand Up @@ -269,6 +277,8 @@ TEST_F(MasterMaintenanceTest, UpdateSchedule)
schedule = createSchedule(
{createWindow({machine1, machine2}, unavailability)});

DROP_MESSAGES(Eq(WriteResponse().GetTypeName()), _, _);

response = process::http::post(
master.get()->pid,
"maintenance/schedule",
Expand Down

1 comment on commit 6805132

@xujyan
Copy link
Owner Author

@xujyan xujyan commented on 6805132 May 4, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This would result in the expected check failure.

F0504 20:43:36.530680 1858991 http.cpp:4304] CHECK_READY(result): is FAILED: Failed to update registry: Failed to perform store within 5secs

Please sign in to comment.