You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Stephen Mallette (Jira)" <ji...@apache.org> on 2020/05/05 14:29:00 UTC

[jira] [Commented] (CASSANDRA-15788) Add tests to cover CacheMetrics

    [ https://issues.apache.org/jira/browse/CASSANDRA-15788?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17099949#comment-17099949 ] 

Stephen Mallette commented on CASSANDRA-15788:
----------------------------------------------

Changes can be found here in this branch for review: 

https://github.com/apache/cassandra/compare/trunk...spmallette:CASSANDRA-15788-trunk

I wasn't sure what {{CachingBench}} was exactly. It had some assertions against metrics but, from what I can tell, it doesn't appear to be a standard unit test so therefore doesn't run as part of that aspect of the build. Some of those tests were failing. I corrected the failures by better respecting caching disabling:

 https://github.com/apache/cassandra/compare/trunk...spmallette:CASSANDRA-15788-trunk#diff-b384ccc30cb742ba6be29db20028243fR169-R175

though I am uncertain if that change will have ill-effect elsewhere. I suppose a CircleCI test run would provide confidence there. Note that as a result of this change {{maybeWrap()}} looks like dead code:

https://github.com/apache/cassandra/compare/trunk...spmallette:CASSANDRA-15788-trunk#diff-b384ccc30cb742ba6be29db20028243fR177-R183

it doesn't appear to have usage so perhaps it can be removed/deprecated. Anyway, I don't have complete confidence in this approach to making the assertions pass - please let me know if that's way off.

> Add tests to cover CacheMetrics
> -------------------------------
>
>                 Key: CASSANDRA-15788
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-15788
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Test/unit
>            Reporter: Stephen Mallette
>            Assignee: Stephen Mallette
>            Priority: Normal
>
> {{CacheMetrics}} and {{ChunkCacheMetrics}} do not have unit tests covering them.  {{CachingBench}} seems to provide some coverage but those tests (which don't appear to run as part of the standard run of unit tests) are failing and do not assert against all defined metrics, nor do they seem to assert code in {{InstrumentingCache}} which also incremented metrics. 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org