Roland Kofler
unread,Feb 27, 2012, 7:33:01 AM2/27/12Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Axon Framework Users
Looks really like a race condition:
org.axonframework.test.AxonAssertionError: One of the events contained
different values than expected
In an event of type [IngredientWeightChanged], the property
[ingredientUUID] was not as expected.
Expected <bc402926-8b59-4743-88fc-f795753d8209> but got
<a18268c8-2bac-4566-bb9b-ca1f0fff1bf6>
It happens approximately every second test-run. Because I expect two
events IngredientWeightChanged, I think the problem is now and then
the second Event comes first. Might be a bug with Fixture?
Appendix:
My Test
fixture.given(
new ArtisanCreated("",Guild.BAKER),
new RecipeCreated(recipeArId, recipeNameExpected, ownerUUID),
new IngredientInserted(ingredientUUID, name, nutsBefore ,
Allergen.False, 100),
new IngredientInserted(ingredientUUID2, "schnaps", nutsBefore ,
Allergen.False, 100),
new RecipeWeightChanged(nutsTot, 200))
when(new ChangeBakeLoss(recipeUUID, 100))
.expectEvents(
new BakeLossChanged(200, 100),
new IngredientWeightChanged(ingredientUUID, nutsAfter, 50),
new IngredientWeightChanged(ingredientUUID2, nutsAfter, 50),
new RecipeWeightChanged(nutsTot, 100)
);