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

Function TEST_F

src/tests/common/future_tracker_tests.cpp:57–85  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

55
56
57TEST_F(FutureTrackerTest, ListPending)
58{
59 Promise<bool> promise1;
60 Promise<bool> promise2;
61
62 Future<bool> future1 = promise1.future();
63 Future<bool> future2 = promise2.future();
64
65 const FutureMetadata data1{"f1", "test1", {}};
66 const FutureMetadata data2{
67 "f2", "test2", {{"arg1", "val1"}, {"arg2", "val2"}}};
68
69 auto track1 =
70 tracker->track(future1, data1.operation, data1.component, data1.args);
71
72 auto track2 =
73 tracker->track(future2, data2.operation, data2.component, data2.args);
74
75 EXPECT_EQ(track1, future1);
76 EXPECT_EQ(track2, future2);
77
78 auto pending = tracker->pendingFutures();
79
80 AWAIT_READY(pending);
81
82 EXPECT_EQ(pending->size(), 2u);
83 EXPECT_EQ(pending->at(0), data1);
84 EXPECT_EQ(pending->at(1), data2);
85}
86
87
88TEST_F(FutureTrackerTest, ListReady)

Callers

nothing calls this directly

Calls 9

trackMethod · 0.80
atMethod · 0.80
futureMethod · 0.45
pendingFuturesMethod · 0.45
sizeMethod · 0.45
setMethod · 0.45
discardMethod · 0.45
resetMethod · 0.45
emptyMethod · 0.45

Tested by

no test coverage detected