couchbase / CouchbaseMock

A Java mock for Couchbase
Apache License 2.0
64 stars 42 forks source link

Reproduce recent stats behaviour #44

Closed griels closed 5 years ago

griels commented 5 years ago

In MemcachedServer.java getStats, the Mock produces a stats key that doesn't seem to be supported any more ("tap").

I'm testing multikey responses from the Python SDK*, so I need two keys that are present in stats. I'm currently working around this by switching based on whether I'm using a Mock or not, as follows, so I'd suggest adding the 'config'='ep_dcp_conn_buffer_size' entry to the stats output:

second_entry = {True: {'tap': "ep_tap_count"}, False: {'config': "ep_dcp_conn_buffer_size"}}[self.is_mock]

*https://github.com/couchbase/couchbase-python-client/blob/bd3bcbba701b89910587eaa89f1793a8c328e8e0/couchbase/tests/cases/stats_t.py#L49-L57

avsej commented 5 years ago

@griels it should be fixed in http://review.couchbase.org/c/102776/