MCPcopy Create free account
hub / github.com/catboost/catboost / get_port_ranges

Function get_port_ranges

library/cpp/testing/unittest/fat/test_port_manager.cpp:15–23  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

13}
14
15void get_port_ranges() {
16 for (int i = 1; i < 10; ++i) {
17 TPortManager pm;
18 ui16 port = pm.GetPortsRange(1024, i);
19 for (int p = port; p < port + i; ++p) {
20 UNIT_ASSERT(IsFreePort(p));
21 }
22 }
23}
24
25Y_UNIT_TEST_SUITE(TestTPortManager) {
26 Y_UNIT_TEST(ParallelRun0) {get_port_ranges();}

Callers 1

Y_UNIT_TESTFunction · 0.85

Calls 2

IsFreePortFunction · 0.85
GetPortsRangeMethod · 0.45

Tested by

no test coverage detected