MCPcopy Create free account
hub / github.com/apache/mesos / TEST

Function TEST

src/tests/containerizer/sched_tests.cpp:35–50  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

33// running competing SCHED_OTHER and SCHED_IDLE tasks.
34
35TEST(SchedTest, ROOT_PolicySelf)
36{
37 Try<Policy> original = sched::policy::get();
38 ASSERT_SOME(original);
39
40 Policy different = (original.get() == Policy::OTHER ? Policy::IDLE
41 : Policy::OTHER);
42
43 // Change our own scheduling policy.
44 EXPECT_SOME(sched::policy::set(different));
45 EXPECT_SOME_EQ(different, sched::policy::get());
46
47 // Change it back.
48 EXPECT_SOME(sched::policy::set(original.get()));
49 EXPECT_SOME_EQ(original.get(), sched::policy::get());
50}
51
52
53// Change the scheduling policy of a different process (our child).

Callers

nothing calls this directly

Calls 6

reapFunction · 0.85
getFunction · 0.50
setFunction · 0.50
sleepFunction · 0.50
killFunction · 0.50
getMethod · 0.45

Tested by

no test coverage detected