server icon indicating copy to clipboard operation
server copied to clipboard

[PM-17562] Fix flickering unit test - WebhookIntegrationHandlerTests

Open brant-livefront opened this issue 6 months ago • 3 comments

🎟️ Tracking

PM-17562

📔 Objective

One of the tests in WebhookIntegrationHandlerTests has been flickering (passing/failing on and off). This was a result of calling DateTime.UtcNow in multiple places in the test. If the test ran slightly too long, it would slip outside the window of the expected range. This PR locks down a specific value at the front of the test so that all of the values agree.

⏰ Reminders before review

  • Contributor guidelines followed
  • All formatters and local linters executed and passed
  • Written new unit and / or integration tests where applicable
  • Protected functional changes with optionality (feature flags)
  • Used internationalization (i18n) for all UI strings
  • CI builds passed
  • Communicated to DevOps any deployment requirements
  • Updated any necessary documentation (Confluence, contributing docs) or informed the documentation team

🦮 Reviewer guidelines

  • 👍 (:+1:) or similar for great changes
  • 📝 (:memo:) or ℹ️ (:information_source:) for notes or general info
  • ❓ (:question:) for questions
  • 🤔 (:thinking:) or 💭 (:thought_balloon:) for more open inquiry that's not quite a confirmed issue and could potentially benefit from discussion
  • 🎨 (:art:) for suggestions / improvements
  • ❌ (:x:) or ⚠️ (:warning:) for more significant problems or concerns needing attention
  • 🌱 (:seedling:) or ♻️ (:recycle:) for future improvements or indications of technical debt
  • ⛏ (:pick:) for minor or nitpick changes

brant-livefront avatar Jun 16 '25 17:06 brant-livefront

Logo Checkmarx One – Scan Summary & Details865fcb0b-435b-4e6e-8a8d-bad6b02986a9

New Issues (5)

Checkmarx found the following issues in this Pull Request

Severity Issue Source File / Package Checkmarx Insight
HIGH Path_Traversal /src/Api/Tools/Controllers/SendsController.cs: 211
detailsMethod PostFile at line 211 of /src/Api/Tools/Controllers/SendsController.cs gets dynamic data from the model element. This element’s value then ...
ID: keY0wh5knH3DnvbREmfJIGGig2k%3D
Attack Vector
HIGH Path_Traversal /src/Api/Tools/Controllers/SendsController.cs: 211
detailsMethod PostFile at line 211 of /src/Api/Tools/Controllers/SendsController.cs gets dynamic data from the model element. This element’s value then ...
ID: 4QIsZ8agHxuL%2BFjdf49NpZJHsvU%3D
Attack Vector
HIGH Path_Traversal /src/Api/Tools/Controllers/SendsController.cs: 211
detailsMethod PostFile at line 211 of /src/Api/Tools/Controllers/SendsController.cs gets dynamic data from the model element. This element’s value then ...
ID: Uwek2GQ3fAsDgtQkgYKs2Vkocog%3D
Attack Vector
HIGH Path_Traversal /src/Api/Tools/Controllers/SendsController.cs: 211
detailsMethod PostFile at line 211 of /src/Api/Tools/Controllers/SendsController.cs gets dynamic data from the model element. This element’s value then ...
ID: OxfkMdVQRO3StOFifYOfb36o2%2Bw%3D
Attack Vector
HIGH Path_Traversal /src/Api/Tools/Controllers/SendsController.cs: 211
detailsMethod PostFile at line 211 of /src/Api/Tools/Controllers/SendsController.cs gets dynamic data from the model element. This element’s value then ...
ID: HvNxhQLOT4P0U2Lbp6HqePXg%2FNQ%3D
Attack Vector

github-actions[bot] avatar Jun 16 '25 17:06 github-actions[bot]

Codecov Report

Attention: Patch coverage is 80.00000% with 2 lines in your changes missing coverage. Please review.

Project coverage is 47.59%. Comparing base (6800bc5) to head (2c3b473). Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...SharedWeb/Utilities/ServiceCollectionExtensions.cs 0.00% 2 Missing :warning:
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5973   +/-   ##
=======================================
  Coverage   47.59%   47.59%           
=======================================
  Files        1676     1676           
  Lines       74736    74741    +5     
  Branches     6753     6753           
=======================================
+ Hits        35569    35574    +5     
- Misses      37706    37707    +1     
+ Partials     1461     1460    -1     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

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

codecov[bot] avatar Jun 16 '25 17:06 codecov[bot]