-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Remove all kernel32.dll references and debug breakpoints #108647
Merged
Merged
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
cb10c4b
remove all kernel32.dll and debugbreak references
VincentBu 279b17c
log exception if run into oom
VincentBu 5ca7365
remove some comments
VincentBu 27a7df8
change debugBreakOnTestHang back to true
VincentBu 2ff0273
throw timeout exception when DebugBreakOnTestHang is false
VincentBu 182c58f
throw exception if fail to write message to log file
VincentBu 83f33f1
set debugBreakOnTestHang to false by default
VincentBu 73d33ac
write message to log in timeout scenario
VincentBu b0f5afd
print out debug break when debugBreakOnTestHang is true
VincentBu a6f9b08
interrupt if debugbreak is presented, otherwise log and throw exception
VincentBu e5a4a46
add _debugBreakOnTestHang field and MissingTestException class
VincentBu f13f6f3
implement DebugBreakOrThrowException method
VincentBu 9b11da6
implement GenerateExceptionMessageAndHandler method
VincentBu File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -79,8 +79,13 @@ private void LogWorker() | |
} | ||
catch (IOException e) | ||
{ | ||
ReliabilityFramework.MyDebugBreak(String.Format("LogWorker IOException:{0}", e.ToString())); | ||
//Disk may be full so simply stop logging | ||
ExceptionHandler exceptionHandler = ReliabilityFramework.GenerateExceptionMessageAndHandler(ReliabilityFramework._debugBreakOnTestHang, e); | ||
string msg = exceptionHandler.HandleMessage; | ||
Action handler = exceptionHandler.Handler; | ||
|
||
Console.WriteLine(msg); | ||
handler(); | ||
} | ||
} | ||
|
||
|
@@ -120,7 +125,12 @@ private void LogWorker() | |
} | ||
catch (IOException e) | ||
{ | ||
ReliabilityFramework.MyDebugBreak(String.Format("LogWorker IOException:{0}", e.ToString())); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We probably want to throw an exception here still after logging? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same as above: if debugger is present => break else, log and throw an exception. |
||
ExceptionHandler exceptionHandler = ReliabilityFramework.GenerateExceptionMessageAndHandler(ReliabilityFramework._debugBreakOnTestHang, e); | ||
string msg = exceptionHandler.HandleMessage; | ||
Action handler = exceptionHandler.Handler; | ||
|
||
Console.WriteLine(msg); | ||
handler(); | ||
} | ||
} | ||
} | ||
|
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's throw the exception here so that we can take a dump
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the debugger break is set to true, we should set a debug break point here and if not, log and throw an exception.