Skip to content

Conversation

@emeroad
Copy link
Member

@emeroad emeroad commented Dec 8, 2025

This pull request updates the copyright year and improves the robustness of the test report output handling in the PluginForkedTestUnitTestDescriptor class. The main change ensures that the code checks for a null report before setting output and logs a message if the report is missing, preventing potential NullPointerExceptions during test execution.

Improvements to test report output handling:

  • Added a null check for the report object before setting its output, preventing exceptions when the report is missing.
  • Introduced logging to notify when a report is null, including relevant identifiers and output for easier debugging.

General maintenance:

  • Updated the copyright year in the file header to 2025.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR enhances error handling in the PluginForkedTestUnitTestDescriptor class by adding a null check for the PluginTestReport object before using it, preventing potential NullPointerExceptions. The copyright year has also been updated to 2025.

Key changes:

  • Added null check before accessing PluginTestReport object during test execution finishing
  • Introduced diagnostic logging when a report is unexpectedly null
  • Updated copyright year to 2025

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

}
} else {
throw new IllegalStateException("unknown status=" + status);
System.out.println("report is null " + reportId + " token:" + Arrays.toString(tokens) + " output:" + Arrays.toString(output));
Copy link

Copilot AI Dec 8, 2025

Choose a reason for hiding this comment

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

When the report is null, the code logs a message but continues silently without setting the test result. This could lead to tests appearing to pass when they should fail or be reported as errored. Consider throwing an exception or at least handling this case more explicitly to ensure test execution failures are properly reported.

For example:

} else {
    String message = "report is null " + reportId + " token:" + Arrays.toString(tokens) + " output:" + Arrays.toString(output);
    System.out.println(message);
    throw new IllegalStateException(message);
}
Suggested change
System.out.println("report is null " + reportId + " token:" + Arrays.toString(tokens) + " output:" + Arrays.toString(output));
String message = "report is null " + reportId + " token:" + Arrays.toString(tokens) + " output:" + Arrays.toString(output);
System.out.println(message);
throw new IllegalStateException(message);

Copilot uses AI. Check for mistakes.
@codecov
Copy link

codecov bot commented Dec 8, 2025

Codecov Report

❌ Patch coverage is 0% with 17 lines in your changes missing coverage. Please review.
✅ Project coverage is 33.38%. Comparing base (63bd299) to head (42e93f8).
⚠️ Report is 7 commits behind head on master.

Files with missing lines Patch % Lines
...descriptor/PluginForkedTestUnitTestDescriptor.java 0.00% 17 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master   #13177      +/-   ##
============================================
- Coverage     33.38%   33.38%   -0.01%     
  Complexity    10956    10956              
============================================
  Files          4063     4063              
  Lines         93946    93950       +4     
  Branches       9777     9778       +1     
============================================
+ Hits          31363    31364       +1     
- Misses        59908    59911       +3     
  Partials       2675     2675              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@emeroad emeroad closed this Dec 10, 2025
@emeroad emeroad deleted the #noissue_cleanup1 branch December 10, 2025 02:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant