----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/64139/#review192095 -----------------------------------------------------------
Fix it, then Ship it! src/tests/cluster.hpp Line 159 (original), 160 (patched) <https://reviews.apache.org/r/64139/#comment270118> How about s/start/create/ here and move the `spawn()` call to the `start()` function defined later, then always call `start()` in all `StartSlave()` functions? And, instead of adding a `mock` parameter in `StartSlave()` functions, we can provide a `CreateMockSlave()` function that doesn't call start. We can just provide one version of `CreateMockSlave()` for now. - Chun-Hung Hsiao On Nov. 29, 2017, 12:37 a.m., Jie Yu wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/64139/ > ----------------------------------------------------------- > > (Updated Nov. 29, 2017, 12:37 a.m.) > > > Review request for mesos, Chun-Hung Hsiao and Greg Mann. > > > Repository: mesos > > > Description > ------- > > This patch refactored the tests to use StartSlave for creating > MockSlave. This allows proper initialization and cleanup in the tests > and avoids code duplication. > > > Diffs > ----- > > src/slave/main.cpp f0716fb90f0b6521dd85e2094dbcdb8621105ea9 > src/tests/cluster.hpp d572a09ea57bf05e04b6df8b2c343a4fb508caef > src/tests/cluster.cpp b8549045e4555e736434f77a837c2c955b599f0a > src/tests/command_executor_tests.cpp > 8d3645461134277828bf8b87bc6061d1e4a36b57 > src/tests/mesos.hpp f02c7c6962c9d0bee57712d8aad9997582c7404b > src/tests/mesos.cpp 9185b5bf2175be5b0f6b6a03a04e9e5445bf22fd > src/tests/mock_slave.hpp 7c4d43a4133e2edb9fdb8da399f8c462104466cd > src/tests/mock_slave.cpp 90c4369ec395a899539822a69d73716b1ec2c489 > src/tests/oversubscription_tests.cpp > 2f403d3c9d2df7d5425b335781e8b62153854ef3 > src/tests/persistent_volume_tests.cpp > b11d26e45c184cf3f0623629b898f67dc95c4fa0 > src/tests/reservation_tests.cpp fa375cd45e4c68551801521176632a56acd6d0ea > src/tests/slave_tests.cpp a2274b691cf94b003c4bc15450d176a9c73517d5 > > > Diff: https://reviews.apache.org/r/64139/diff/1/ > > > Testing > ------- > > make check > > > Thanks, > > Jie Yu > >
