Copilot commented on code in PR #794:
URL:
https://github.com/apache/rocketmq-dashboard/pull/794#discussion_r3701776666
##########
server/src/test/java/org/apache/rocketmq/studio/instance/topic/LiteTopicControllerTest.java:
##########
@@ -126,6 +128,23 @@ void extendTTLShouldDelegateToService() throws Exception {
verify(liteTopicService).extendTTL(eq("chat/{sessionId}"),
eq(7_200_000L));
}
+ @Test
+ void extendTTLShouldReturnUnsupportedWhenProviderIsUnavailable() throws
Exception {
+ LiteTopicTTLUpdateDTO request = new LiteTopicTTLUpdateDTO();
+ request.setTopicPattern("chat/{sessionId}");
+ request.setNewTTL(7_200_000L);
Review Comment:
Only the /extendTTL endpoint has a controller-level test for the new 501
BusinessException path. Since LiteTopicService#getQuota and #getSession now
also throw BusinessException(501) by default, adding analogous WebMvc tests for
/api/liteTopic/quota and /api/liteTopic/session/{sessionId} would lock the API
status-code + body mapping for those endpoints too (and prevent regressions if
exception handling changes).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]