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

Prepared structure for parallel validation #64

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

SergKhram
Copy link

@SergKhram SergKhram commented Mar 29, 2021

I use this framework in current project, but I want to parallel all validations
I use kotlin coroutines for it like that:
val listOfAsync = mutableListOf<Deferred<Any>>() runBlocking(dispatcher) { listOfValidations.forEach(this.coroutineContext) { listOfAsync.add(validate(SOME_PROPERTY).SOME_VALIDATION()) } listOfAsync.awaitAll() }

But it is not safety for parallel, because constraintViolations val is not Concurrent

@SergKhram
Copy link
Author

@rodolphocouto check it pls

@SergKhram SergKhram force-pushed the feature/prepared-structure-for-parallel-validation branch 8 times, most recently from e420ebc to 15398cd Compare March 30, 2021 06:12
@SergKhram SergKhram force-pushed the feature/prepared-structure-for-parallel-validation branch from 15398cd to 49d4df1 Compare March 30, 2021 06:46
@SergKhram
Copy link
Author

@rodolphocouto
I check it local without my changes - it isn't my fault - what I need to do ?)

X should return 422 with locale en()
java.lang.AssertionError: Body content Expected child 'value' but was 'null' - comparing <value...> at /unprocessableEntity[1]/errors[1]/error[1]/constraint[1]/params[1]/param[1]/value[1] to
at org.valiktor.springframework.http.webmvc.ConstraintViolationExceptionHandlerXmlTest.should return 422 with locale en(ConstraintViolationExceptionHandlerXmlTest.kt:83)
X should return 422 with locale pt_BR()
java.lang.AssertionError: Body content Expected child 'value' but was 'null' - comparing <value...> at /unprocessableEntity[1]/errors[1]/error[1]/constraint[1]/params[1]/param[1]/value[1] to
at org.valiktor.springframework.http.webmvc.ConstraintViolationExceptionHandlerXmlTest.should return 422 with locale pt_BR(ConstraintViolationExceptionHandlerXmlTest.kt:99)
X should return 422 with default locale()
java.lang.AssertionError: Body content Expected child 'value' but was 'null' - comparing <value...> at /unprocessableEntity[1]/errors[1]/error[1]/constraint[1]/params[1]/param[1]/value[1] to
at org.valiktor.springframework.http.webmvc.ConstraintViolationExceptionHandlerXmlTest.should return 422 with default locale(ConstraintViolationExceptionHandlerXmlTest.kt:67)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant