Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix LogMerger when no log is created #867

Merged
merged 5 commits into from
Aug 6, 2024

Conversation

CanvasCompanyHylke
Copy link
Contributor

When thare are no tests to run, the LogMerger crashes on the last test (assert($mainSuite !== null);), because there are no log files generated to merge together. With this initial check in the WrapperRunner, we only try to merge the log files if there are actually created log files. The list with junitFiles is populated with a SplFileObject for every process/thread it will be running on, but none of the temp files are actually generated/written.

When thare are no tests to run, the `LogMerger` crashes on the last test (`assert($mainSuite !== null);`), because there are no log files generated to merge together. With this initial check in the WrapperRunner, we only try to merge the log files if there are actually created log files. The list with junitFiles is populated with a SplFileObject for every process/thread it will be running on, but none of the temp files are actually generated/written.
@Slamdunk
Copy link
Member

Slamdunk commented Aug 5, 2024

Hi, can you add a test please?

@CanvasCompanyHylke
Copy link
Contributor Author

Hi, can you add a test please?

I tried it. The single test works fine. But I can't get the whole suite working without errors locally. Hopefully it works fine in the workflow here 🙈.

@Slamdunk
Copy link
Member

Slamdunk commented Aug 6, 2024

Perfect, thank you

But I can't get the whole suite working without errors locally.

That's on me, you did good 👍

@Slamdunk Slamdunk added the bug label Aug 6, 2024
@Slamdunk Slamdunk changed the title Update WrapperRunner.php Fix LogMerger when no log is created Aug 6, 2024
@Slamdunk Slamdunk merged commit 6f990d0 into paratestphp:7.x Aug 6, 2024
8 checks passed
@CanvasCompanyHylke CanvasCompanyHylke deleted the patch-1 branch August 6, 2024 12:38
Slamdunk pushed a commit to Slamdunk/paratest that referenced this pull request Sep 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

2 participants