Fix/bowl copilot fixes and tests - #285
Closed
JusterZhu wants to merge 3 commits into
Closed
Conversation
- BowlCrashPipelineTests: simulates full crash -> dump -> report -> callback flow - MockCrashStrategy writes fake dump file, real CrashReporter creates JSON - Verifies DumpCaptured, file existence, report content, OnCrash callback data - Tests Normal mode (no restore) and healthy exit (no crash) scenarios - Added InternalsVisibleTo to Bowl.csproj for test access to internal DI constructor - Outputs all file paths and report contents via ITestOutputHelper for inspection
…FILES=1 Dispose() now skips cleanup when Debugger.IsAttached or KEEP_FILES env=1, so developers can inspect dump files and crash reports on disk.
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the GeneralUpdate.Bowl project to make internal APIs accessible to the Bowl test project and adds a new end-to-end integration test suite that simulates crash/dump/report behavior without requiring procdump.
Changes:
- Added
InternalsVisibleToforBowlTestinGeneralUpdate.Bowlto enable testing internal constructors/providers. - Added
BowlCrashPipelineTestsintegration tests to validate dump/report generation, restore behavior, and theOnCrashcallback using mock strategies/providers.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
| src/c#/GeneralUpdate.Bowl/GeneralUpdate.Bowl.csproj | Adds InternalsVisibleTo to allow BowlTest to access internal APIs. |
| src/c#/BowlTest/Integration/BowlCrashPipelineTests.cs | Adds new crash-pipeline integration tests with mock strategies/providers that write real artifacts to temp folders. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| <ItemGroup> | ||
| <Folder Include="Common\" /> | ||
| </ItemGroup> | ||
| <ItemGroup> |
Comment on lines
+249
to
+257
| }; | ||
|
|
||
| var bowl = CreateBowl(mockStrategy); | ||
| var result = await bowl.LaunchAsync(context); | ||
|
|
||
| _output.WriteLine($"Healthy — Success: {result.Success}, DumpCaptured: {result.DumpCaptured}"); | ||
|
|
||
| Assert.False(result.DumpCaptured, "No dump should be captured for healthy process"); | ||
| Assert.Equal(0, result.ExitCode); |
Comment on lines
+276
to
+280
|
|
||
| public MockCrashStrategy(string dumpPath, IReadOnlyList<string> outputLines) | ||
| { | ||
| _dumpPath = dumpPath; | ||
| _outputLines = outputLines; |
Comment on lines
+290
to
+294
| FileName = "cmd.exe", | ||
| Arguments = "/c exit 0", | ||
| RedirectStandardOutput = true, | ||
| RedirectStandardError = true, | ||
| UseShellExecute = false, |
Comment on lines
+315
to
+319
| FileName = "cmd.exe", | ||
| Arguments = "/c exit 0", | ||
| RedirectStandardOutput = true, | ||
| RedirectStandardError = true, | ||
| UseShellExecute = false, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.