-
Notifications
You must be signed in to change notification settings - Fork 0
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
feat: rely on rabbitmq dlq for computation errors handling #156
base: main
Are you sure you want to change the base?
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -75,6 +75,7 @@ | |
import static org.gridsuite.securityanalysis.server.util.TestUtils.assertLogMessage; | ||
import static org.hamcrest.MatcherAssert.assertThat; | ||
import static org.junit.jupiter.api.Assertions.assertEquals; | ||
import static org.junit.jupiter.api.Assertions.assertNull; | ||
import static org.mockito.ArgumentMatchers.any; | ||
import static org.mockito.BDDMockito.given; | ||
import static org.mockito.Mockito.doNothing; | ||
|
@@ -673,11 +674,8 @@ void runTestWithError() throws Exception { | |
UUID resultUuid = mapper.readValue(resultAsString, UUID.class); | ||
assertEquals(RESULT_UUID, resultUuid); | ||
|
||
// Message stopped has been sent | ||
Message<byte[]> cancelMessage = output.receive(TIMEOUT, "sa.failed"); | ||
assertEquals(RESULT_UUID.toString(), cancelMessage.getHeaders().get("resultUuid")); | ||
assertEquals("me", cancelMessage.getHeaders().get("receiver")); | ||
assertEquals(getFailedMessage(COMPUTATION_TYPE) + " : " + ERROR_MESSAGE, cancelMessage.getHeaders().get("message")); | ||
// No result message | ||
assertNull(output.receive(TIMEOUT, "sa.result")); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think the equivalent test is to check if there is a .ComputationException with the corresponding message? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. can we check the run.dlx? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. no sadly it doesn't work... the default test binder setup by springcloudstream doesn't behave the same, then I couldn't test like that |
||
|
||
// No result | ||
assertResultNotFound(RESULT_UUID); | ||
|
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.
to remove next powsybl upgrade?
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 will update with the released version of powsybl-ws-commons anyway, so I will ad the comment