Repository navigation
test(amber, common): remove unused spec mixins and bindings - #9597
Conversation
Automated Reviewer SuggestionsBased on the
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #9597 +/- ##
============================================
- Coverage 91.67% 91.66% -0.02%
Complexity 5135 5135
============================================
Files 1304 1301 -3
Lines 58088 57943 -145
Branches 7582 7546 -36
============================================
- Hits 53254 53112 -142
+ Misses 2922 2919 -3
Partials 1912 1912
*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:
|
|
| config | throughput | MB/s | latency | max Δ latest / 7d | |
|---|---|---|---|---|---|
| 🔴 | bs=10 sw=10 sl=64 | 459 | 0.28 | 20,719/27,496/27,496 us | 🟢 -12.9% / 🔴 +104.6% |
| ⚪ | bs=100 sw=10 sl=64 | 966 | 0.59 | 101,756/122,430/122,430 us | ⚪ within ±5% / 🔴 +41.3% |
| 🔴 | bs=1000 sw=10 sl=64 | 1,129 | 0.689 | 876,200/987,295/987,295 us | 🔴 +5.2% / 🔴 +21.2% |
Baseline details
Latest main 95e2748 from same runner
| config | metric | PR | latest main | 7d avg | Δ latest | Δ 7d |
|---|---|---|---|---|---|---|
| bs=10 sw=10 sl=64 | throughput | 459 tuples/sec | 462 tuples/sec | 1,018 tuples/sec | -0.6% | -54.9% |
| bs=10 sw=10 sl=64 | MB/s | 0.28 MB/s | 0.282 MB/s | 0.622 MB/s | -0.7% | -55.0% |
| bs=10 sw=10 sl=64 | p50 | 20,719 us | 18,847 us | 10,127 us | +9.9% | +104.6% |
| bs=10 sw=10 sl=64 | p95 | 27,496 us | 31,563 us | 13,693 us | -12.9% | +100.8% |
| bs=10 sw=10 sl=64 | p99 | 27,496 us | 31,563 us | 16,105 us | -12.9% | +70.7% |
| bs=100 sw=10 sl=64 | throughput | 966 tuples/sec | 972 tuples/sec | 1,364 tuples/sec | -0.6% | -29.2% |
| bs=100 sw=10 sl=64 | MB/s | 0.59 MB/s | 0.593 MB/s | 0.832 MB/s | -0.5% | -29.1% |
| bs=100 sw=10 sl=64 | p50 | 101,756 us | 102,956 us | 79,321 us | -1.2% | +28.3% |
| bs=100 sw=10 sl=64 | p95 | 122,430 us | 121,064 us | 86,661 us | +1.1% | +41.3% |
| bs=100 sw=10 sl=64 | p99 | 122,430 us | 121,064 us | 98,907 us | +1.1% | +23.8% |
| bs=1000 sw=10 sl=64 | throughput | 1,129 tuples/sec | 1,130 tuples/sec | 1,406 tuples/sec | -0.1% | -19.7% |
| bs=1000 sw=10 sl=64 | MB/s | 0.689 MB/s | 0.689 MB/s | 0.858 MB/s | 0.0% | -19.7% |
| bs=1000 sw=10 sl=64 | p50 | 876,200 us | 887,738 us | 776,724 us | -1.3% | +12.8% |
| bs=1000 sw=10 sl=64 | p95 | 987,295 us | 938,399 us | 814,345 us | +5.2% | +21.2% |
| bs=1000 sw=10 sl=64 | p99 | 987,295 us | 938,399 us | 862,305 us | +5.2% | +14.5% |
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,435.55,200,128000,459,0.280,20719.37,27496.45,27496.45
1,100,10,64,20,2069.61,2000,1280000,966,0.590,101756.05,122430.22,122430.22
2,1000,10,64,20,17708.13,20000,12800000,1129,0.689,876200.25,987294.68,987294.68
kunwp1
left a comment
There was a problem hiding this comment.
LGTM! A longer-term option: .scalafix.conf has RemoveUnused.locals = false, and no module enables -Wunused:locals. Turning those on in check mode would catch unread bindings like these in CI, instead of needing a hand sweep.
Address the review on apache#9597: - Remove the unused MockFactory from CostBasedScheduleGeneratorSpec, RangeBasedShuffleSpec and WorkerSpec. - Remove the unused BeforeAndAfterEach from BatchSizePropagationSpec, DataProcessorSpec and TrivialControlSpec. - Remove the unused BeforeAndAfterAll from DefaultCostEstimatorSpec, LakeFSStorageClientMtimeSpec and IcebergDocumentConsoleMessagesSpec. - Remove the unused BeforeAndAfter from KeywordSearchOpExecSpec. - Drop BeforeAndAfterAll from LargeBinaryInputStreamSpec, LargeBinaryOutputStreamSpec and S3StorageClientSpec, since S3StorageTestBase already extends it. - Shut down the actor system in LoggingSpec and ReplaySpec, the two TestKit specs that never did. - Drop `ex shouldBe a[AssertionError]` after `expectError[AssertionError]`, which already returns that type, in ContinuousErrorBandsOpDescSpec, NestedTableOpDescSpec, WaterfallChartOpDescSpec and WindRoseChartOpDescSpec.
|
Thanks for the review! Agreed on |
What changes were proposed in this PR?
Remove unused ScalaTest mixin traits, unread local exception bindings, and type checks that cannot fail across 31 test specs in
amber,common/workflow-core, andcommon/workflow-operator, and shut down the actor systems of the twoTestKitspecs that never did. No production code changes:MockFactorymixin (amber): Remove theMockFactorytrait and import inNetworkInputGatewaySpec,CostBasedScheduleGeneratorSpec,RangeBasedShuffleSpec, andWorkerSpec, which create no mocks or stubs.BeforeAndAfterEachmixin (amber,common/workflow-core): Remove the trait and import inBatchSizePropagationSpec,DataProcessorSpec,TrivialControlSpec,FileResolverSpec,LargeBinaryInputStreamSpec,LargeBinaryOutputStreamSpec, andS3StorageClientSpec, which define no per-test hooks.BeforeAndAfterAllmixin (amber,common/workflow-core): Remove it fromDefaultCostEstimatorSpec,IcebergDocumentConsoleMessagesSpec, andLakeFSStorageClientMtimeSpec, which define no suite hooks, and fromLargeBinaryInputStreamSpec,LargeBinaryOutputStreamSpec, andS3StorageClientSpec, whoseS3StorageTestBasealready extends it; theirsuper.beforeAll()/super.afterAll()chains are unchanged.amber):LoggingSpecandReplaySpecmixed inBeforeAndAfterAllwith no hook and never shut down theirTestKitactor systems; they now callTestKit.shutdownActorSystem(system)inafterAll, like the otherTestKitspecs.BeforeAndAftermixin (common/workflow-operator): Remove the trait and import inURLFetcherOpExecSpec,TypeCastingOpExecSpec,HtmlVizOpExecSpec, andKeywordSearchOpExecSpec, which have nobefore/afterblocks.val ex =bindings and type checks that cannot fail (common/workflow-operator): Drop 17 unreadval ex =assignments onexpectError[AssertionError](...)calls across 10 visualization operator specs (ImageVisualizerOpDescSpec,ScatterMatrixChartOpDescSpec,ContinuousErrorBandsOpDescSpec,FigureFactoryTableOpDescSpec,HistogramChartOpDescSpec,TablesPlotOpDescSpec,TernaryContourOpDescSpec,TernaryPlotOpDescSpec,WaterfallChartOpDescSpec, andWindRoseChartOpDescSpec). InContinuousErrorBandsOpDescSpec,NestedTableOpDescSpec,WaterfallChartOpDescSpec, andWindRoseChartOpDescSpec, also replace eachval ex = expectError[AssertionError](...)followed byex shouldBe a[AssertionError]with a bareexpectErrorcall, sinceexpectErroralready returns the interceptedAssertionError.Any related issues, documentation, discussions?
Closes #9595.
How was this PR tested?
Ran on
7e79747ea8(JDK 17.0.14,sbt 1.12.9,STORAGE_ICEBERG_CATALOG_TYPE=hadoop, Docker running for theWorkflowCoreRustFS and LakeFS test containers):scalafmtCheckAllandscalafixAll --checkacrossWorkflowCore,WorkflowOperator, andWorkflowExecutionService: passed.WorkflowOperator:15suites,94passed (0failed,0skipped).WorkflowCore:5suites,118passed (0failed,0skipped).WorkflowExecutionService:11suites,65passed (0failed,0skipped).Was this PR authored or co-authored using generative AI tooling?
Generated-by: Antigravity (Gemini 4 Neon), Claude Code (Claude Opus 5.5)