-
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: redirect build failures on rabbit dlq #122
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Joris Mancini <[email protected]>
e0949e0
to
df8ba6b
Compare
Signed-off-by: Joris Mancini <[email protected]>
pom.xml
Outdated
@@ -84,7 +84,11 @@ | |||
<dependencyManagement> | |||
<dependencies> | |||
<!-- overrides of imports --> | |||
|
|||
<dependency> |
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?
Map<String, Object> additionalHeaders = new HashMap<>(); | ||
additionalHeaders.put(HEADER_BUS_ID, busId); |
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.
are we sure we can remove 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.
Yes because it is set in the run message already, so if it is defined in the run message it will be forwarded in the DLQ
assertEquals("me", failedMessage.getHeaders().get("receiver")); | ||
assertEquals("BUSBARSECTION_ID_NOT_EXISTING", failedMessage.getHeaders().get(HEADER_BUS_ID)); | ||
|
||
assertNull(output.receive(TIMEOUT, shortCircuitAnalysisResultDestination)); |
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.
why can't we have the same message without the additional header?
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.
check computationexception?
Message<byte[]> resultMessage = output.receive(TIMEOUT, shortCircuitAnalysisFailedDestination); | ||
assertEquals("Short circuit analysis has failed : Missing short-circuit extension data", resultMessage.getHeaders().get("message")); | ||
assertEquals(RESULT_UUID.toString(), resultMessage.getHeaders().get("resultUuid")); | ||
assertEquals("me", resultMessage.getHeaders().get("receiver")); |
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.
why can't we have the same message without the additional header?
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.
check computationexception?
@@ -148,8 +150,7 @@ void testGetBusFaultFromOutOfVoltageBus() throws Exception { | |||
try (var shortCircuitAnalysisMockedStatic = TestUtils.injectShortCircuitAnalysisProvider(analysisProvider); | |||
var shortCircuitResultContextMockedStatic = mockStatic(ShortCircuitResultContext.class)) { | |||
shortCircuitResultContextMockedStatic.when(() -> ShortCircuitResultContext.fromMessage(message, objectMapper)).thenReturn(resultContext); | |||
workerService.consumeRun().accept(message); | |||
verify(notificationService).publishFail(any(), any(), eq("Selected bus is out of voltage"), any(), any(), any()); | |||
assertThrows(ComputationException.class, () -> workerService.consumeRun().accept(message)); |
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.
could keep checking "Selected bus is out of voltage" ?
Signed-off-by: Joris Mancini <[email protected]>
Quality Gate passedIssues Measures |
No description provided.