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

Function selectOtherPort

src/tests/containerizer/ports_isolator_tests.cpp:135–144  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

133// Select a random port that is not the same as the one given.
134template <typename R>
135static uint16_t selectOtherPort(const R& resources, uint16_t port)
136{
137 uint16_t selected;
138
139 do {
140 selected = selectRandomPort(resources);
141 } while (selected == port);
142
143 return selected;
144}
145
146
147template <typename T>

Callers 1

TEST_FFunction · 0.85

Calls 1

selectRandomPortFunction · 0.85

Tested by

no test coverage detected