liucongjy commented on code in PR #9594:
URL: https://github.com/apache/seatunnel/pull/9594#discussion_r2232966475
##########
seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/rest/servlet/BaseServlet.java:
##########
@@ -145,4 +155,36 @@ protected Map<String, String>
getParameterMap(HttpServletRequest req) {
}
return reqParameterMap;
}
+
+ @VisibleForTesting
+ public void writeJsonForTest(HttpServletResponse resp, Object obj, String
type)
+ throws IOException {
+ switch (type) {
+ case "1":
+ writeJson(resp, obj);
+ break;
+ case "2":
+ writeJson(resp, (JsonArray) obj);
+ break;
+ case "3":
+ writeJson(resp, (JsonObject) obj);
+ break;
+ case "4":
+ writeJson(resp, (JsonArray) obj, 200);
+ break;
+ case "5":
+ writeJson(resp, (JsonObject) obj, 200);
+ break;
+ case "6":
+ writeJson(resp, obj, 200);
+ break;
+ case "7":
+ write(resp, obj);
+ break;
+ case "8":
+ writeHtml(resp, obj);
+ break;
+ default:
+ }
+ }
Review Comment:
The test code in the source code has been removed, and unit tests have been
re-added to simulate running tasks and making HTTP requests to the log
interface to check whether the returned character set is UTF-8
--
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]