Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,13 @@ public void runE2ETests() {
File e2eDir = new File(this.e2eDir);
List<String> passedProjects = new ArrayList<>();
File[] files = e2eDir.listFiles();
Comment on lines 57 to 59
Copy link

Copilot AI Feb 16, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The local variable File e2eDir = new File(this.e2eDir); shadows the e2eDir field name; with the added error handling it’s now easy to confuse this.e2eDir (String) vs e2eDir (File). Renaming the local variable (e.g., e2eDirFile) would make this block clearer.

Suggested change
File e2eDir = new File(this.e2eDir);
List<String> passedProjects = new ArrayList<>();
File[] files = e2eDir.listFiles();
File e2eDirFile = new File(this.e2eDir);
List<String> passedProjects = new ArrayList<>();
File[] files = e2eDirFile.listFiles();

Copilot uses AI. Check for mistakes.
if (files == null) {
LOGGER.error("Failed to list files in directory: " + this.e2eDir);
LOGGER.error("Please check if the directory exists and is accessible.");
Comment on lines +61 to +62
Copy link

Copilot AI Feb 16, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These new log lines use string concatenation; elsewhere in this file SLF4J parameterized logging is used (e.g., LOGGER.error("Test Directory: {}", ...)). Prefer {} placeholders here as well to avoid unnecessary string building and keep logging consistent.

Copilot uses AI. Check for mistakes.
Comment on lines 59 to +62
Copy link

Copilot AI Feb 16, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

File.listFiles() returns null for multiple reasons (path doesn’t exist, not a directory, I/O/permission issues). Consider checking e2eDir.exists() / e2eDir.isDirectory() and logging the absolute path + those flags so failures are easier to diagnose.

Copilot uses AI. Check for mistakes.
System.exit(1);
return;
}

// use this order to run saga test first, because saga test is easy to fail
List<File> filterFiles = Arrays.stream(files).sorted((a, b) -> {
int scoreA = caseOrder.getOrDefault(a.getName().charAt(0), 0);
Expand Down
Loading