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

[MAN-481] Fortify event-firing mechanism against rogue user-land exceptions #169

Conversation

ksidirop-laerdal
Copy link
Collaborator

No description provided.

…d .InvokeAllEventHandlersAndIgnoreExceptions() which guarantees that all event-handlers will be called even if some throw an exception (old was: using the built-in .Invoke())
Copy link

github-actions bot commented Jan 24, 2025

Test Results

127 tests  +3   127 ✅ +3   1m 22s ⏱️ +6s
  1 suites ±0     0 💤 ±0 
  1 files   ±0     0 ❌ ±0 

Results for commit c71f940. ± Comparison against base commit dc217ff.

This pull request removes 5 and adds 8 tests. Note that renamed tests count towards both.
Laerdal.McuMgr.Tests.FirmwareInstaller.FirmwareInstallerTestbed ‑ InstallAsync_ShouldCompleteSuccessfullyWithLastDitchAttemptUsingLowerInitialMtu_GivenFlakyConnectionForFileUploading(testNickname: "FIT.IA.SCSWLDAULIM.GPDFFU.010", maxTriesCount: 2)
Laerdal.McuMgr.Tests.FirmwareInstaller.FirmwareInstallerTestbed ‑ InstallAsync_ShouldCompleteSuccessfullyWithLastDitchAttemptUsingLowerInitialMtu_GivenFlakyConnectionForFileUploading(testNickname: "FIT.IA.SCSWLDAULIM.GPDFFU.020", maxTriesCount: 3)
Laerdal.McuMgr.Tests.FirmwareInstaller.FirmwareInstallerTestbed ‑ InstallAsync_ShouldCompleteSuccessfullyWithLastDitchAttemptUsingLowerInitialMtu_GivenFlakyConnectionForFileUploading(testNickname: "FIT.IA.SCSWLDAULIM.GPDFFU.030", maxTriesCount: 5)
Laerdal.McuMgr.Tests.FirmwareInstaller.FirmwareInstallerTestbed ‑ InstallAsync_ShouldThrowFirmwareInstallationCancelledException_GivenCancellationRequestMidflight(testcaseNickname: "FIT.IA.STFICE.GCRM.010", isCancellationLeadingToSoftLanding: True)
Laerdal.McuMgr.Tests.FirmwareInstaller.FirmwareInstallerTestbed ‑ InstallAsync_ShouldThrowFirmwareInstallationCancelledException_GivenCancellationRequestMidflight(testcaseNickname: "FIT.IA.STFICE.GCRM.020", isCancellationLeadingToSoftLanding: False)
Laerdal.McuMgr.Tests.FirmwareInstaller.FirmwareInstallerTestbed ‑ InstallAsync_ShouldCompleteSuccessfullyWithLastDitchAttemptUsingLowerInitialMtu_GivenFlakyConnectionForFileUploading(testNickname: "FIT.IA.SCSWLDAULIM.GPDFFU.010", maxTriesCount: 2, simulateUserlandExceptionsInEventHandlers: False)
Laerdal.McuMgr.Tests.FirmwareInstaller.FirmwareInstallerTestbed ‑ InstallAsync_ShouldCompleteSuccessfullyWithLastDitchAttemptUsingLowerInitialMtu_GivenFlakyConnectionForFileUploading(testNickname: "FIT.IA.SCSWLDAULIM.GPDFFU.020", maxTriesCount: 3, simulateUserlandExceptionsInEventHandlers: False)
Laerdal.McuMgr.Tests.FirmwareInstaller.FirmwareInstallerTestbed ‑ InstallAsync_ShouldCompleteSuccessfullyWithLastDitchAttemptUsingLowerInitialMtu_GivenFlakyConnectionForFileUploading(testNickname: "FIT.IA.SCSWLDAULIM.GPDFFU.025", maxTriesCount: 5, simulateUserlandExceptionsInEventHandlers: True)
Laerdal.McuMgr.Tests.FirmwareInstaller.FirmwareInstallerTestbed ‑ InstallAsync_ShouldCompleteSuccessfullyWithLastDitchAttemptUsingLowerInitialMtu_GivenFlakyConnectionForFileUploading(testNickname: "FIT.IA.SCSWLDAULIM.GPDFFU.030", maxTriesCount: 5, simulateUserlandExceptionsInEventHandlers: False)
Laerdal.McuMgr.Tests.FirmwareInstaller.FirmwareInstallerTestbed ‑ InstallAsync_ShouldThrowFirmwareInstallationCancelledException_GivenCancellationRequestMidflight(testcaseNickname: "FIT.IA.STFICE.GCRM.010", isCancellationLeadingToSoftLanding: False, simulateUserlandExceptionsInEventHandlers: False)
Laerdal.McuMgr.Tests.FirmwareInstaller.FirmwareInstallerTestbed ‑ InstallAsync_ShouldThrowFirmwareInstallationCancelledException_GivenCancellationRequestMidflight(testcaseNickname: "FIT.IA.STFICE.GCRM.015", isCancellationLeadingToSoftLanding: False, simulateUserlandExceptionsInEventHandlers: True)
Laerdal.McuMgr.Tests.FirmwareInstaller.FirmwareInstallerTestbed ‑ InstallAsync_ShouldThrowFirmwareInstallationCancelledException_GivenCancellationRequestMidflight(testcaseNickname: "FIT.IA.STFICE.GCRM.020", isCancellationLeadingToSoftLanding: True, simulateUserlandExceptionsInEventHandlers: False)
Laerdal.McuMgr.Tests.FirmwareInstaller.FirmwareInstallerTestbed ‑ InstallAsync_ShouldThrowFirmwareInstallationCancelledException_GivenCancellationRequestMidflight(testcaseNickname: "FIT.IA.STFICE.GCRM.025", isCancellationLeadingToSoftLanding: True, simulateUserlandExceptionsInEventHandlers: True)

♻️ This comment has been updated with latest results.

…d to validate arguments and to have it try to log any errors it detects on the event-handlers it invokes
@ksidirop-laerdal ksidirop-laerdal merged commit a6b68cd into develop Jan 24, 2025
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant