test(amber): cover email notification dispatch - #7191
Conversation
Automated Reviewer SuggestionsBased on the
|
|
| config | throughput | MB/s | latency | max Δ latest / 7d | |
|---|---|---|---|---|---|
| 🟢 | bs=10 sw=10 sl=64 | 532 | 0.325 | 17,775/24,944/24,944 us | 🟢 -12.4% / 🔴 +54.0% |
| 🔴 | bs=100 sw=10 sl=64 | 1,015 | 0.62 | 95,931/129,048/129,048 us | 🔴 +12.8% / 🔴 +16.5% |
| ⚪ | bs=1000 sw=10 sl=64 | 1,276 | 0.779 | 781,501/836,845/836,845 us | ⚪ within ±5% / 🟢 +28.6% |
Baseline details
Latest main 0783470 from same runner
| config | metric | PR | latest main | 7d avg | Δ latest | Δ 7d |
|---|---|---|---|---|---|---|
| bs=10 sw=10 sl=64 | throughput | 532 tuples/sec | 550 tuples/sec | 765.25 tuples/sec | -3.3% | -30.5% |
| bs=10 sw=10 sl=64 | MB/s | 0.325 MB/s | 0.336 MB/s | 0.467 MB/s | -3.3% | -30.4% |
| bs=10 sw=10 sl=64 | p50 | 17,775 us | 18,196 us | 12,703 us | -2.3% | +39.9% |
| bs=10 sw=10 sl=64 | p95 | 24,944 us | 28,490 us | 16,199 us | -12.4% | +54.0% |
| bs=10 sw=10 sl=64 | p99 | 24,944 us | 28,490 us | 19,557 us | -12.4% | +27.5% |
| bs=100 sw=10 sl=64 | throughput | 1,015 tuples/sec | 1,115 tuples/sec | 965.22 tuples/sec | -9.0% | +5.2% |
| bs=100 sw=10 sl=64 | MB/s | 0.62 MB/s | 0.68 MB/s | 0.589 MB/s | -8.8% | +5.2% |
| bs=100 sw=10 sl=64 | p50 | 95,931 us | 86,249 us | 103,830 us | +11.2% | -7.6% |
| bs=100 sw=10 sl=64 | p95 | 129,048 us | 114,449 us | 110,778 us | +12.8% | +16.5% |
| bs=100 sw=10 sl=64 | p99 | 129,048 us | 114,449 us | 118,713 us | +12.8% | +8.7% |
| bs=1000 sw=10 sl=64 | throughput | 1,276 tuples/sec | 1,273 tuples/sec | 992.33 tuples/sec | +0.2% | +28.6% |
| bs=1000 sw=10 sl=64 | MB/s | 0.779 MB/s | 0.777 MB/s | 0.606 MB/s | +0.3% | +28.6% |
| bs=1000 sw=10 sl=64 | p50 | 781,501 us | 783,981 us | 1,016,959 us | -0.3% | -23.2% |
| bs=1000 sw=10 sl=64 | p95 | 836,845 us | 832,440 us | 1,062,501 us | +0.5% | -21.2% |
| bs=1000 sw=10 sl=64 | p99 | 836,845 us | 832,440 us | 1,082,611 us | +0.5% | -22.7% |
Raw CSV
config_idx,batch_size,schema_width,string_len,num_batches,total_ms,total_tuples,total_bytes,tuples_per_sec,mb_per_sec,lat_p50_us,lat_p95_us,lat_p99_us
0,10,10,64,20,376.07,200,128000,532,0.325,17775.07,24943.53,24943.53
1,100,10,64,20,1970.07,2000,1280000,1015,0.620,95930.77,129047.76,129047.76
2,1000,10,64,20,15673.34,20000,12800000,1276,0.779,781500.69,836845.01,836845.01
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #7191 +/- ##
============================================
+ Coverage 80.58% 80.65% +0.07%
- Complexity 3890 3912 +22
============================================
Files 1162 1162
Lines 46264 46264
Branches 5153 5153
============================================
+ Hits 37280 37314 +34
+ Misses 7319 7276 -43
- Partials 1665 1674 +9
*This pull request uses carry forward flags. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
🟢 Ready to approve
The change set is test-only, aligns with the stated issue/PR goals, and the added tests directly exercise the key dispatch and recovery behaviors.
This review doesn't count toward merge requirements. Sign up for the private preview to control whether Copilot approvals count.
Pull request overview
Adds focused ScalaTest unit coverage for EmailNotificationService in the Amber/web service layer, validating dispatch, suppression, and exception recovery paths without relying on external email infrastructure.
Changes:
- Introduces a new
EmailNotificationServiceSpecverifying that the exact workflow state is evaluated and (when allowed) dispatched. - Adds a suppression test ensuring
sendStatusEmailis not invoked whenshouldSendEmaildeclines. - Adds a recovery test ensuring exceptions from the notifier do not fail
processEmailNotificationIfNeeded.
File summaries
| File | Description |
|---|---|
| amber/src/test/scala/org/apache/texera/web/service/EmailNotificationServiceSpec.scala | Adds unit tests covering send, suppression, and exception recovery behavior for EmailNotificationService. |
Review details
- Files reviewed: 1/1 changed files
- Comments generated: 0
- Review effort level: Lite
We're testing this review assessment. Please use 👍 or 👎 to tell us if it's correct.
What changes were proposed in this PR?
Adds focused unit coverage for email notification dispatch, suppression, and recovery from sender exceptions without requiring external infrastructure.
Any related issues, documentation, discussions?
Closes #7188
How was this PR tested?
WorkflowExecutionService/testOnly org.apache.texera.web.service.EmailNotificationServiceSpec— 3 passed.WorkflowExecutionService/Test/scalafmtAllandWorkflowExecutionService/Test/scalafixWorkflowExecutionService/Test/scalafmtCheckandWorkflowExecutionService/Test/scalafix --checkMutation proof (each production change was reverted):
Was this PR authored or co-authored using generative AI tooling?
Generated-by: Codex (GPT-5)