ddd-by-examples / library

A comprehensive Domain-Driven Design example with problem space strategic analysis and various tactical patterns.
MIT License
4.88k stars 723 forks source link

Not all tests are deterministic #45

Open KamilWitkowski7 opened 4 years ago

KamilWitkowski7 commented 4 years ago

I cloned repository from master branch today. During mvn clean install I got once:

[INFO] [INFO] Results: [INFO] [ERROR] Failures: [ERROR] FindingPatronProfileInDatabaseIT.should create patron profile:65->thereIsOnlyOneHold:87 Condition not satisfied:

profile.holdsView.currentHolds.get(0) == new Hold(bookId, TOMORROW) | | | | | | | | | | | | | | | 2019-12-17T13:17:58.435995800Z | | | | | | BookId(bookId=53fbcaff-78d1-4159-8516-4fa6f5b8b945) | | | | | Hold(book=BookId(bookId=53fbcaff-78d1-4159-8516-4fa6f5b8b945), till=2019-12-17T13:17:58.435995800Z) | | | | false | | | Hold(book=BookId(bookId=53fbcaff-78d1-4159-8516-4fa6f5b8b945), till=2019-12-17T13:17:58.435996Z) | | List(Hold(book=BookId(bookId=53fbcaff-78d1-4159-8516-4fa6f5b8b945), till=2019-12-17T13:17:58.435996Z)) | HoldsView(currentHolds=List(Hold(book=BookId(bookId=53fbcaff-78d1-4159-8516-4fa6f5b8b945), till=2019-12-17T13:17:58.435996Z))) PatronProfile(holdsView=HoldsView(currentHolds=List(Hold(book=BookId(bookId=53fbcaff-78d1-4159-8516-4fa6f5b8b945), till=2019-12-17T13:17:58.435996Z))), currentCheckouts=CheckoutsView(currentCheckouts=List()))

[INFO] [ERROR] Tests run: 33, Failures: 1, Errors: 0, Skipped: 0

2nd, 3rd, etc. time I runned tests their were fine.

pilloPl commented 4 years ago

Hi,

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

KamilWitkowski7 commented 4 years ago

Hey, I will focus some of my time on https://github.com/ddd-by-examples/library/issues/46