Skip to content

Commit

Permalink
Merge pull request #358 from mmagi/fix_test-suite-running
Browse files Browse the repository at this point in the history
fix: Suite显示执行完成 但是在网页上的测试报告仍然显示 running的问题
  • Loading branch information
ZhouYixun authored Jun 5, 2023
2 parents 8faa9c0 + 1cacc33 commit 29b79e1
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ public JSONArray findCaseStatus(int id) {
jsonObject.put("case", testCases);
int status = 0;
for (int j = caseTimes.size() - 1; j >= 0; j--) {
if (caseTimes.get(j).getInteger("case_id") == testCases.getId()) {
if (Objects.equals(caseTimes.get(j).getInteger("case_id"), testCases.getId())) {
jsonObject.put("startTime", sf.format(caseTimes.get(j).getDate("startTime")));
jsonObject.put("endTime", sf.format(caseTimes.get(j).getDate("endTime")));
caseTimes.remove(j);
Expand Down Expand Up @@ -333,7 +333,7 @@ public void setStatus(Results results) {
delete(results.getId());
} else {
//发收相同的话,表明测试结束了
if (results.getReceiveMsgCount() == results.getSendMsgCount()) {
if (Objects.equals(results.getReceiveMsgCount(), results.getSendMsgCount())) {
results.setEndTime(new Date());
save(results);
Projects projects = projectsService.findById(results.getProjectId());
Expand Down

0 comments on commit 29b79e1

Please sign in to comment.