-
Notifications
You must be signed in to change notification settings - Fork 810
Feature/handler test case #3606
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Requesting some minor changes. But in all, I think the structure is fair!
Let me reply to your main description comments here too:
Did I miss any useful cases?
I am missing the Event Handler cases. To validate void
works (super simple/dumb, of course), CompletableFuture<?>
works, and Mono<?>
works, but without taking any concrete result that might be given by the subscribed event handler.
Should I leave in the comments / Disabled tests?
As long as disabled tests refer to todos which refer to issue numbers, that's all fair game!
Should this be named TestSuite or Test?
I my head, a test-suite is a(n abstract) class
that has concrete implementations for concrete scenarios. An example of this is the MessageTestSuite
, ConverterTestSuite
, or EventStorageEngineTestSuite
. Each expect the construction of a test subject.
The form you've created, to me, is a regular test. Looking at the structure you've given rise to, I do think it is fine to keep it a test instead of making it into a test suite.
import reactor.core.publisher.Flux; | ||
import reactor.core.publisher.Mono; | ||
|
||
public class AsyncMessageHandlerTest { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: you could make the class and test methods package-private.
@@ -0,0 +1,201 @@ | |||
package org.axonframework.messaging; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing the copyright notice. You can take the copyright-template.xml
for that!
|
||
@Test | ||
public void annotatedQueryHandlerShouldUseIterableReturnType() { | ||
// TODO missing subscribe method for potential AnnotatedQueryHandlingComponent |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
assertCommands(); | ||
} | ||
|
||
// TODO there seems to be a difference between how CommandHandler and QueryHandler can be subscribed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This discrepancy has to do with the QueryBus
not having been rewritten to be a QueryHandlerRegistry
yet. That should be tackled in issue #3488 too.
|
||
assertCommands(); | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am missing validations for Event Handlers! Or do you want to further discuss that in one of the design sessions? :-)
Adds:
Open questions:
TestSuite
orTest
?