diff --git a/sonic-server-controller/src/main/java/org/cloud/sonic/controller/services/impl/StepsServiceImpl.java b/sonic-server-controller/src/main/java/org/cloud/sonic/controller/services/impl/StepsServiceImpl.java index 7126306a..0af3a687 100644 --- a/sonic-server-controller/src/main/java/org/cloud/sonic/controller/services/impl/StepsServiceImpl.java +++ b/sonic-server-controller/src/main/java/org/cloud/sonic/controller/services/impl/StepsServiceImpl.java @@ -121,6 +121,7 @@ public void sortSteps(StepSort stepSort) { .le(Steps::getSort, stepSort.getStartId()) // >= .ge(Steps::getSort, stepSort.getEndId()) + .orderByAsc(Steps::getSort) .list(); if (stepSort.getDirection().equals("down")) { diff --git a/sonic-server-controller/src/main/java/org/cloud/sonic/controller/services/impl/TestCasesServiceImpl.java b/sonic-server-controller/src/main/java/org/cloud/sonic/controller/services/impl/TestCasesServiceImpl.java index 41f00f95..f723c2da 100644 --- a/sonic-server-controller/src/main/java/org/cloud/sonic/controller/services/impl/TestCasesServiceImpl.java +++ b/sonic-server-controller/src/main/java/org/cloud/sonic/controller/services/impl/TestCasesServiceImpl.java @@ -108,7 +108,7 @@ public JSONObject findSteps(int id) { Map> valueMap = new HashMap<>(); for (GlobalParams g : globalParamsList) { if (g.getParamsValue().contains("|")) { - List shuffle = Arrays.asList(g.getParamsValue().split("|")); + List shuffle = Arrays.asList(g.getParamsValue().split("\\|")); Collections.shuffle(shuffle); valueMap.put(g.getParamsKey(), shuffle); } else {