pelikan icon indicating copy to clipboard operation
pelikan copied to clipboard

add admin-protocol related unit test

Open thinkingfish opened this issue 9 years ago • 1 comments

thinkingfish avatar Nov 26 '15 11:11 thinkingfish

Currently working on adding the second set of admin protocol unit tests, and I have run into a roadblock. To write these unit tests, we need to write parse_reply; currently struct reply does not lend itself well to being parsed because we cannot really go from a composed "stats" response to struct metric * (since it is ambiguous whether a metric is a gauge or a counter) and since we use a pointer to where the metric is being kept, and it doesn't make sense to create a new struct metric when parsing a reply, since the struct metric we create would not be part of any overlying array of struct metric. We could refactor admin/reply to be more similar to how the original struct response in the memcache module worked with stats, but I think the current solution for struct reply is simpler if we only need to compose replies instead of parse them as well. Any thoughts?

kevyang avatar Dec 05 '15 04:12 kevyang