listing testrig files in alphabetical order (for test ref comparison)
@@ -13,6 +13,7 @@ import java.nio.file.Path;
import java.nio.file.Paths;
import java.security.AccessControlException;
import java.util.ArrayList;
+import java.util.Arrays;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
@@ -668,10 +669,15 @@ public class WorkMgr {
StringBuilder retStringBuilder = new StringBuilder();
- for (File subFile : submittedTestrigDir.listFiles()) {
+ File[] subFiles = submittedTestrigDir.listFiles();
+ Arrays.sort(subFiles);
+
+ for (File subFile : subFiles) {
retStringBuilder.append(subFile.getName());
if (subFile.isDirectory()) {
File[] subSubFiles = subFile.listFiles();
+ Arrays.sort(subSubFiles);
+
retStringBuilder.append("/\n");
// now append a maximum of 10
@@ -810,7 +816,10 @@ public class WorkMgr {
List<String> containers = new ArrayList<>();
- for (File file : containersDir.listFiles()) {
+ File[] files = containersDir.listFiles();
+ Arrays.sort(files);
+
+ for (File file : files) {
if (file.isDirectory() && Main.getAuthorizer()
.isAccessibleContainer(apiKey, file.getName(), false)) {
containers.add(file.getName());
