> On March 10, 2015, 11:40 a.m., Zameer Manji wrote: > > src/common/type_utils.cpp, line 56 > > <https://reviews.apache.org/r/31905/diff/1/?file=890459#file890459line56> > > > > Would it be possible to add some sort of test or tooling to prevent > > regressions? > > Vinod Kone wrote: > Not sure, what are the right set of tests for operators of this kind. A > bunch of tests, where we compare two messages with them differing in just one > field, for all possible fields? That seems like a lot of code! > > I think the thing we are missing is a way to automatically check that a > newly added field is accounted for in the comparison? Not sure if that's what > you mean by regression? I don't yet know how to do this. > > With regards to ExecutorInfo, a valuable set of tests to have is where we > launch a new task on an old running executor after master/slave failover. > I'll send a review out for those tests in a subsequent review.
Existing code could use the reflection API to ensure all fields are accounted for in equality: https://developers.google.com/protocol-buffers/docs/reference/cpp/google.protobuf.message#Reflection. Alternatively, the == operator implementations could be generated by a protobuf plugin: https://developers.google.com/protocol-buffers/docs/reference/cpp/google.protobuf.compiler.plugin I think either of those solutions could prevent regressions. - Zameer ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/31905/#review75925 ----------------------------------------------------------- On March 10, 2015, 5:37 p.m., Vinod Kone wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/31905/ > ----------------------------------------------------------- > > (Updated March 10, 2015, 5:37 p.m.) > > > Review request for mesos, Ben Mahler, Jie Yu, Joerg Schad, and Timothy Chen. > > > Bugs: MESOS-2309 > https://issues.apache.org/jira/browse/MESOS-2309 > > > Repository: mesos > > > Description > ------- > > When new fields were added to protobufs these operators were not updated. > Fixed now. > > > Diffs > ----- > > src/common/type_utils.cpp a1704c67d04d19f65d94dbe56a61bb28561e5bf3 > > Diff: https://reviews.apache.org/r/31905/diff/ > > > Testing > ------- > > make check > > > Thanks, > > Vinod Kone > >
