-
Notifications
You must be signed in to change notification settings - Fork 1
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
Pivotal ID # 185352396: Fixed Concurrency File Operations #744
Pivotal ID # 185352396: Fixed Concurrency File Operations #744
Conversation
- Make submit operations fully suspended - Improve some tests structure
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fantastic changes please consider questions before merge.
private fun processSafely(request: RequestMessage, process: RequestMessage.() -> Unit) { | ||
runCatching { process(request) }.onFailure { onError(it, request) } | ||
private fun processSafely(request: RequestMessage, process: suspend RequestMessage.() -> Unit) { | ||
runCatching { runBlocking { process(request) } }.onFailure { onError(it, request) } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wondering if this is working correctly I mean if in error we get the exception of real problem of the issue or if it get wrapper in a CorotuineException or something like that that and we need to use the cause of the exception and no the exception itself. Did you check this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right, it should be the other way around: runCatching inside runBlocking. Nice catch 😁👍
every { extSerializationService.deserialize(submissionJson) } returns extSubmission | ||
|
||
mvc.multipart("/submissions/extended") { | ||
content = submissionJson | ||
param(SUBMISSION, submissionJson) | ||
}.andExpect { | ||
}.asyncDispatch().andExpect { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this needed? what does it do?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since now the endpoint is async, we need this to properly call the mock mvc object
- Fully suspended endpoints - Use supervisor scope instead of default dispatchers - Remove spring async timeout
https://www.pivotaltracker.com/story/show/185352396