Skip to content

Commit

Permalink
bugfix:用例保存优化
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaofeng committed Sep 13, 2021
1 parent 20b4d42 commit 8d6f36e
Show file tree
Hide file tree
Showing 37 changed files with 86 additions and 40 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ private void internalHandleCtrlMessage(String msg) {

public void leavebroadcastMessageForHttp(String msg) {
for (Player p : players) {
p.getBufferedMessages().add(msg);
p.getClient().sendMessage(CaseMessageType.EDITOR, msg);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -325,18 +325,18 @@ public void wsSave(WsSaveReq req) {
basePatch.put("path", "/base");
basePatch.put("value", reqContent.get("base").asLong() + 1);
patches.add(basePatch);
room.leavebroadcastMessageForHttp(patches.toString());
room.leavebroadcastMessageForHttp(req.getCaseContent());
room.setTestCaseContent(req.getCaseContent());
LOGGER.info("非最后离开, 将变更补丁信息发送给其他用户. req内容是: ", reqContent.toString());
LOGGER.info("room内容是: ", baseContent.toString());
} else {
LOGGER.info("patch太小." + patches.toString());
LOGGER.info("内存中数据与待保存数据一致." + patches.toString());
}
} catch (Exception e) {
LOGGER.error("http保存比较内容失败.", e);
}
} else {
LOGGER.info("websocket实例已经退出,无需发送消息.");
LOGGER.info("websocket实例已经退出或未编辑,无需发送消息.");
}
// }

Expand Down

Large diffs are not rendered by default.

Large diffs are not rendered by default.

24 changes: 12 additions & 12 deletions case-server/src/main/resources/web/dist/index.html
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width,initial-scale=1" />
<title>AgileTC</title>
<style type="text/css">body{overflow: auto !important;}</style>
</head>
<body>
<div id="root"></div>
<script th:src="@{/umi.c3201dac.js}"></script>
</body>
</html>
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width,initial-scale=1" />
<title>AgileTC</title>
<style type="text/css">body{overflow: auto !important;}</style>
</head>
<body>
<div id="root"></div>
<script th:src="@{/umi.4983b3ba.js}"></script>
</body>
</html>

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

This file was deleted.

Large diffs are not rendered by default.

This file was deleted.

Large diffs are not rendered by default.

This file was deleted.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

This file was deleted.

This file was deleted.

This file was deleted.

Large diffs are not rendered by default.

Loading

0 comments on commit 8d6f36e

Please sign in to comment.