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

fix: Serial Execution Strategy #124

Conversation

CrownedPhoenix
Copy link

@CrownedPhoenix CrownedPhoenix commented Apr 11, 2023

Exposed a bug in mocks for FieldExecutionStrategyTests affecting testSerialFieldExecutionStrategyWithMultipleFieldErrors.

Prior to the change, the test appeared to be serial because the mocking framework blocked execution before returning the future - as opposed to blocking execution on the EventLoop.

The SerialFieldExecutionStrategy execution resolution implementation used NIO's .flatten on an array of futures (which all executed concurrently). However, the creation of these futures was thread blocked specifically in the tests, leading to the appearance of serial execution.

These changes correct the catalyzing test mock as well as SerialFieldExecutionStrategy such that it resolves fields in a truly serial fashion.

Copy link
Member

@NeedleInAJayStack NeedleInAJayStack left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks excellent, other than a minor formatting violation. Thanks @CrownedPhoenix!

@NeedleInAJayStack
Copy link
Member

Fixes #86

Updated test mocks to properly expose non-serial behavior.
Updated SerialFieldExecutionStrategy to actually be serial.
@CrownedPhoenix CrownedPhoenix force-pushed the fix/serial-execution-strategy branch 3 times, most recently from 421281a to d9379d0 Compare April 12, 2023 16:55
@NeedleInAJayStack
Copy link
Member

I'm going to bypass the formatting requirement for now because it doesn't tell us what needs to be formatted. I will create a followup MR to rework the formatting system.

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.

None yet

2 participants