[
https://issues.apache.org/jira/browse/CASSANDRA-13458?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16475665#comment-16475665
]
Stefan Podkowinski commented on CASSANDRA-13458:
------------------------------------------------
* Rebased against latest CASSANDRA-13457 WIP branch
* Added {{OverrideConfigurationLoader}} to make tests work again after
disabling diag events by default
Also addressed comments:
* "shouldn't all classes for this ticket be added under src/test/" - moved
helper classes to test/unit
* "should `DiagnosticEventService.throwOnce(..)` be in the production code?" -
I'd prefer keeping {{DiagnosticEventService.throwOnce}} next to
{{DiagnosticEventService.once}} and the other subscribe methods, as all of them
consume and transform events asynchronously in one way or another.
* "interfaces don't need public methods" - fixed
* "should classes be final (when possible)? (not sure about c* code style
here)" - probably a matter of personal style, but I don't see why anyone should
not extend the classes
* "modifier order: `static final` not `final static`" - fixed
* "i'm presuming HintsServiceEventsTest will be updated to assert against the
extra DISPATCHING_PAUSED event at shutdown time" - assertion added
> 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]