----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/45964/#review147500 -----------------------------------------------------------
Moved over some tests to their corresponding changes: https://github.com/apache/mesos/commit/d4970b78313943aecff7d0366621fbab43563c84 https://github.com/apache/mesos/commit/1d5ea3d48e95a10ba6064d9560718f75d14447fc Moved in tests from https://reviews.apache.org/r/45961/ src/tests/resources_tests.cpp (line 790) <https://reviews.apache.org/r/45964/#comment214683> src/tests/resources_tests.cpp (line 790) <https://reviews.apache.org/r/45964/#comment214686> Changed this to ``` TEST(SharedResourcesTest, Printing) { Resources volume = createPersistentVolume( Megabytes(64), "role1", "id1", "path1", None(), None(), "principal1", true); // Shared. { ostringstream oss; oss << volume; EXPECT_EQ("disk(role1)[id1:path1]<SHARED>:64<1>", oss.str()); } { ostringstream oss; oss << volume + volume; EXPECT_EQ("disk(role1)[id1:path1]<SHARED>:64<2>", oss.str()); } } ``` And committed in https://github.com/apache/mesos/commit/1d5ea3d48e95a10ba6064d9560718f75d14447fc src/tests/resources_tests.cpp (lines 2363 - 2369) <https://reviews.apache.org/r/45964/#comment214677> Might be worth adding a stanza that DESTROY the volume and the resource should be back to the original. I added it to the commit: https://github.com/apache/mesos/blob/02acd84bfb96917c36af5f7c7813fd9d708977df/src/tests/resources_tests.cpp#L2326-L2332 src/tests/resources_tests.cpp (lines 2548 - 2565) <https://reviews.apache.org/r/45964/#comment214685> `shared()` is covered in `SharedResourcesTest.Filter`. What do these lines add in terms of test coverage? - Jiang Yan Xu On Aug. 29, 2016, 12:22 a.m., Anindya Sinha wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/45964/ > ----------------------------------------------------------- > > (Updated Aug. 29, 2016, 12:22 a.m.) > > > Review request for mesos and Jiang Yan Xu. > > > Bugs: MESOS-4324 > https://issues.apache.org/jira/browse/MESOS-4324 > > > Repository: mesos > > > Description > ------- > > Add unit tests for sharing of resources. > > > Diffs > ----- > > src/tests/hierarchical_allocator_tests.cpp > ddd48694e5c2d3d01fbff20558a46c1256b3dbc3 > src/tests/master_validation_tests.cpp > e440ff3f6d04f797e65874b9f610ed63d9f28e0e > src/tests/mesos.hpp 4cae54b4df906d4b7e8fe8d40d5b0ad59d260e6f > src/tests/persistent_volume_tests.cpp > a6f97c4bb5fb29d610c01255036095e2b30c44c5 > src/tests/resources_tests.cpp 4932d95f4e78cae764b89472373e13527b4354a2 > > Diff: https://reviews.apache.org/r/45964/diff/ > > > Testing > ------- > > Tests for shared resources added for allocator, resources and sorter. > Tests successful. > > > Thanks, > > Anindya Sinha > >
