eventuate-tram / eventuate-tram-core

Transactional messaging for microservices
Other
1.05k stars 186 forks source link

Missing event tests #139

Open dartartem opened 3 years ago

dartartem commented 3 years ago

There are tests for messages

and module for command testing: eventuate-tram-commands-db-broker-integration-test

But there are no event tests. Probably we should add them.

cer commented 3 years ago

What would these events tests actually test?

dartartem commented 3 years ago

DomainEventPublisher and DomainEventDispatcher (Event publishing and subscribing)

cer commented 3 years ago

OK. But this issue missing a lot of details.

Are you proposing in-memory tests or are they with a real database and/or message broker?

And what would be the cost of these tests in terms of execution time?

dartartem commented 3 years ago

Are you proposing in-memory tests or are they with a real database and/or message broker?

message broker tests, at least kafka

And what would be the cost of these tests in terms of execution time?

I will check

dartartem commented 3 years ago

@cer Chris,

eventuate-tram-core-examples-basic contains a test similar to what I would like to implement on eventuate-tram-core side.

https://github.com/dartartem/eventuate-tram-core-examples-basic/blob/2d04a0abd87cb79ec22d3c72e78c13e4bbd95ad9/eventuate-tram-examples-common/src/main/java/io/eventuate/tram/examples/basic/events/AbstractTramEventTest.java#L26-L39

On kafka and mysql profile it takes about 3 seconds (If run from Idea).