Skip to content
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

Test MeteredDomainEventPublisherSpec is not running during build. #46

Closed
KamilWitkowski7 opened this issue Dec 16, 2019 · 3 comments · Fixed by #51
Closed

Test MeteredDomainEventPublisherSpec is not running during build. #46

KamilWitkowski7 opened this issue Dec 16, 2019 · 3 comments · Fixed by #51

Comments

@KamilWitkowski7
Copy link

I cloned repository from master branch today.

When running mvn clean install I don't see every test:

[INFO] --- maven-failsafe-plugin:2.22.1:integration-test (default) @ library ---
[INFO]
[INFO] -------------------------------------------------------
[INFO] T E S T S
[INFO] -------------------------------------------------------
[INFO] Running io.pillopl.library.catalogue.CatalogueDatabaseIT
(...)
[INFO] Running io.pillopl.library.lending.book.infrastructure.BookDatabaseRepositoryIT
(...)
[INFO] Running io.pillopl.library.lending.book.infrastructure.DuplicateHoldFoundIT
(...)
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 7.468 s - in io.pillopl.library.lending.book.infrastructure.DuplicateHoldFoundIT
[INFO] Running io.pillopl.library.lending.book.infrastructure.FindAvailableBookInDatabaseIT
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.005 s - in io.pillopl.library.lending.book.infrastructure.FindAvailableBookInDatabaseIT
[INFO] Running io.pillopl.library.lending.book.infrastructure.FindBookOnHoldInDatabaseIT
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.001 s - in io.pillopl.library.lending.book.infrastructure.FindBookOnHoldInDatabaseIT
[INFO] Running io.pillopl.library.lending.book.infrastructure.OptimisticLockingBookAggregateIT
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.023 s - in io.pillopl.library.lending.book.infrastructure.OptimisticLockingBookAggregateIT
[INFO] Running io.pillopl.library.lending.dailysheet.infrastructure.FindingHoldsInDailySheetDatabaseIT
[INFO] Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.15 s - in io.pillopl.library.lending.dailysheet.infrastructure.FindingHoldsInDailySheetDatabaseIT
[INFO] Running io.pillopl.library.lending.dailysheet.infrastructure.FindingOverdueCheckoutsInDailySheetDatabaseIT
[INFO] Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.034 s - in io.pillopl.library.lending.dailysheet.infrastructure.FindingOverdueCheckoutsInDailySheetDatabaseIT
[INFO] Running io.pillopl.library.lending.eventspropagation.EventualConsistencyBetweenAggregatesAndReadModelsIT
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.697 s - in io.pillopl.library.lending.eventspropagation.EventualConsistencyBetweenAggregatesAndReadModelsIT
[INFO] Running io.pillopl.library.lending.eventspropagation.StrongConsistencyBetweenAggregatesAndReadModelsIT
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.021 s - in io.pillopl.library.lending.eventspropagation.StrongConsistencyBetweenAggregatesAndReadModelsIT
[INFO] Running io.pillopl.library.lending.patron.infrastructure.PatronDatabaseRepositoryIT
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.017 s - in io.pillopl.library.lending.patron.infrastructure.PatronDatabaseRepositoryIT
[INFO] Running io.pillopl.library.lending.patronprofile.infrastructure.FindingPatronProfileInDatabaseIT
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.036 s - in io.pillopl.library.lending.patronprofile.infrastructure.FindingPatronProfileInDatabaseIT
[INFO] Running io.pillopl.library.lending.patronprofile.web.PatronProfileControllerIT
(...)
[INFO] Tests run: 12, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.455 s - in io.pillopl.library.lending.patronprofile.web.PatronProfileControllerIT
(...)
[INFO] Tests run: 33, Failures: 0, Errors: 0, Skipped: 0

There's log about BookDatabaseRepositoryIT whis is annoted with @SpringBootTest
but there's no log about MeteredDomainEventPublisherSpec test which is weird.

Changing MeteredDomainEventPublisherSpec test to something like:

        then:
            countedEvents("domain_events", "name", "TestEvent") == 12121
        when:
            publisher.publish(new TestEvent())
        then:
            countedEvents("domain_events", "name", "TestEvent") == 13131

Clearly proves that this test is not runned.

@pilloPl
Copy link
Member

pilloPl commented Dec 16, 2019

Hi,

Do you want to find a root cause and provide solution?

@KamilWitkowski7 KamilWitkowski7 changed the title Test MeteredDomainEventPublisherSpec is not runned during build. Test MeteredDomainEventPublisherSpec is not running during build. Dec 16, 2019
@KamilWitkowski7
Copy link
Author

KamilWitkowski7 commented Dec 16, 2019

Hi,

Do you want to find a root cause and provide solution?

Hey, i am not sure i will have time for it. I will try giving it a few minutes and I will see how it will go.

EDIT: In my current project the client wants to use junit so i won't have time for it.

@mszarlinski
Copy link
Contributor

My bad, I will fix it. Test class name should end with IT :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants