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

Inconsistency in AggregateTestFixture with constructor command handlers #3020

Open
CodeDrivenMitch opened this issue May 6, 2024 · 1 comment
Labels
Type: Bug Use to signal issues that describe a bug within the system.

Comments

@CodeDrivenMitch
Copy link
Member

Basic information

  • Axon Framework version: 4.9.1
  • JDK version: -
  • Complete executable reproducer if available (e.g. GitHub Repo): -

Steps to reproduce

  • Create aggregate with constructor command handler
  • Create AggregateTestFixture and execute givenCommands and when on it with the same creational command
  • The test succeeds, and there is a second event published at index 0

Expected behaviour

The AggregateTestFixture should detect a constructor command handler being called for the second time, or being able to validate the unqqueness of the aggregate through validating the event indexes.

Actual behaviour

The test passes, allowing two events with index 0.

@CodeDrivenMitch CodeDrivenMitch added the Type: Bug Use to signal issues that describe a bug within the system. label May 6, 2024
@abuijze
Copy link
Member

abuijze commented May 9, 2024

Are you sure it's appending two events, or is it the consistency check that's kicking in an applying event 0 to a fresh instance of the aggregate to ensure it doesn't have any "illegal state changes"?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Use to signal issues that describe a bug within the system.
Projects
None yet
Development

No branches or pull requests

2 participants