[
https://issues.apache.org/jira/browse/CASSANDRA-13458?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16457943#comment-16457943
]
mck commented on CASSANDRA-13458:
---------------------------------
Questions on the code i have:
- love the fluid (dsl) api that's appearing here!
- adding production code for tests patch confuses me a bit, shouldn't all
classes for this ticket be added under src/test/ ?
- should `DiagnosticEventService.throwOnce(..)` be in the production code?
would it be possible to keep such code in the tests? (ie do we really want to
be altering the production code behaviour dynamically like this? i could be
wrong: maybe we'll be adding in production assertions in this way?)
- HintsServiceEventsTest is awesome!
- i'm presuming HintsServiceEventsTest will be updated to assert against the
extra DISPATCHING_PAUSED event at shutdown time
And nit-picks:
- interfaces don't need public methods,
- should classes be final (when possible)? (not sure about c* code style here),
- modifier order: `static final` not `final static`
- i'm sure there's other small stuff to catch but that's probably better to do
with github comments once the branch gets rebased off the latest
CASSANDRA-13457 commits.
> Diag. Events: Add unit testing support
> --------------------------------------
>
> Key: CASSANDRA-13458
> URL: https://issues.apache.org/jira/browse/CASSANDRA-13458
> Project: Cassandra
> Issue Type: Sub-task
> Components: Testing
> Reporter: Stefan Podkowinski
> Assignee: Stefan Podkowinski
> Priority: Major
>
> Diagnostic events will improve unit testing by
> * providing test execution control instances based on CompletableFutures (see
> [PendingRangeCalculatorServiceTest.java|https://github.com/spodkowinski/cassandra/blob/WIP-13458/test/unit/org/apache/cassandra/gms/PendingRangeCalculatorServiceTest.java])
>
> * validate state and behavior by allowing you to inspect generated events
> (see
> [HintsServiceEventsTest.java|https://github.com/spodkowinski/cassandra/blob/WIP-13458/test/unit/org/apache/cassandra/hints/HintsServiceEventsTest.java])
> See included
> [testing.rst|https://github.com/spodkowinski/cassandra/blob/WIP-13458/doc/source/development/testing.rst#diagnostic-events-40]
> draft for more details. Let me know if this would be useful for you as a
> developer.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]