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

Send events when creating entities in multipart post #2070

Merged
merged 1 commit into from
Aug 9, 2024

Conversation

rschev
Copy link
Contributor

@rschev rschev commented Aug 8, 2024

Spring content creates entities when using multipart post. However, it didn't send events for onBeforeCreate and onAfterCreate, so when you have custom validation you would bypass it with the multipart.

@paulcwarren
Copy link
Owner

I am always in two minds about how to test these things. I see you made the test single-threaded to ensure no other tests are publishing events at the same time. This always makes me a little sad but I dont really see a good way to test under multi-threaded conditions so ¯_(ツ)_/¯ I guess

@paulcwarren paulcwarren merged commit 8ee769c into paulcwarren:main Aug 9, 2024
5 checks passed
@paulcwarren
Copy link
Owner

paulcwarren commented Aug 9, 2024

Thanks much @rschev

@rschev
Copy link
Contributor Author

rschev commented Aug 9, 2024

Yeah, setting it to single-threaded seemed like the simplest way to accomplish this. I suppose I could've also tried to check that the list of events at least contained one with a value unique for that test, and ignored the other events.

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 this pull request may close these issues.

2 participants