Skip to content

test(workflow-operator): add unit test coverage for visualization option enums#6043

Closed
aglinxinyuan wants to merge 1 commit into
apache:mainfrom
aglinxinyuan:test-visualization-enums
Closed

test(workflow-operator): add unit test coverage for visualization option enums#6043
aglinxinyuan wants to merge 1 commit into
apache:mainfrom
aglinxinyuan:test-visualization-enums

Conversation

@aglinxinyuan

Copy link
Copy Markdown
Contributor

What changes were proposed in this PR?

Pin behavior of seven previously-untested visualization option enums in common/workflow-operator. No production-code changes.

Spec Source enum Tests
RadarPlotLinePatternSpec RadarPlotLinePattern 2
LineModeSpec LineMode 4
HierarchyChartTypeSpec HierarchyChartType 2
NormalizationTypeSpec NormalizationType 2
RangeSliderHandleDuplicateFunctionSpec RangeSliderHandleDuplicateFunction 2
ContourPlotColoringFunctionSpec ContourPlotColoringFunction 2
BoxViolinPlotQuartileFunctionSpec BoxViolinPlotQuartileFunction 2

Behavior pinned

Surface Contract
wire mapping each constant's @JsonValue string + constant counts
LineMode extras getModeInPlotly (lines/markers/lines+markers); @JsonCreator fromString case-insensitive + unknown-value rejection
Jackson round-trip serialize + deserialize back to the constant

Any related issues, documentation, discussions?

Part of the ongoing workflow-operator unit-test coverage effort.

How was this PR tested?

  • sbt "WorkflowOperator/testOnly *RadarPlotLinePatternSpec *LineModeSpec *HierarchyChartTypeSpec *NormalizationTypeSpec *RangeSliderHandleDuplicateFunctionSpec *ContourPlotColoringFunctionSpec *BoxViolinPlotQuartileFunctionSpec" — 16 tests, all green
  • sbt "WorkflowOperator/Test/scalafmtCheck" and sbt "WorkflowOperator/scalafixAll --check" — clean
  • CI to confirm

Was this PR authored or co-authored using generative AI tooling?

Generated-by: Claude Code (Opus 4.8 [1M context])

Copilot AI review requested due to automatic review settings July 1, 2026 01:25
@github-actions github-actions Bot added the common label Jul 1, 2026
@github-actions

github-actions Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Automated Reviewer Suggestions

Based on the git blame history of the changed files, we recommend the following reviewers:

  • No candidates found from git blame history.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR strengthens the common/workflow-operator test suite by adding unit tests that “pin” the JSON wire-format and Jackson round-trip behavior for several visualization option enums used by operators and UI/property-window configuration.

Changes:

  • Added ScalaTest specs to verify each enum constant’s @JsonValue mapping and expected constant count.
  • Added Jackson serialization/deserialization round-trip tests for each enum using the shared JSONUtils.objectMapper.
  • Added targeted tests for LineMode’s extra behaviors (getModeInPlotly and case-insensitive @JsonCreator fromString, including unknown-value rejection).

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.

Show a summary per file
File Description
common/workflow-operator/src/test/scala/org/apache/texera/amber/operator/visualization/rangeSlider/RangeSliderHandleDuplicateFunctionSpec.scala Pins wire values, enum size, and Jackson round-trip for the range slider duplicate-function enum.
common/workflow-operator/src/test/scala/org/apache/texera/amber/operator/visualization/radarPlot/RadarPlotLinePatternSpec.scala Pins wire values, enum size, and Jackson round-trip for radar plot line patterns.
common/workflow-operator/src/test/scala/org/apache/texera/amber/operator/visualization/lineChart/LineModeSpec.scala Adds coverage for LineMode wire mapping + Plotly mode translation + fromString behavior + Jackson round-trip.
common/workflow-operator/src/test/scala/org/apache/texera/amber/operator/visualization/histogram2d/NormalizationTypeSpec.scala Pins wire values, enum size, and Jackson round-trip for histogram2d normalization types.
common/workflow-operator/src/test/scala/org/apache/texera/amber/operator/visualization/hierarchychart/HierarchyChartTypeSpec.scala Pins wire values, enum size, and Jackson round-trip for hierarchy chart type selection.
common/workflow-operator/src/test/scala/org/apache/texera/amber/operator/visualization/contourPlot/ContourPlotColoringFunctionSpec.scala Pins wire values, enum size, and Jackson round-trip for contour plot coloring functions.
common/workflow-operator/src/test/scala/org/apache/texera/amber/operator/visualization/boxViolinPlot/BoxViolinPlotQuartileFunctionSpec.scala Pins wire values, enum size, and Jackson round-trip for box/violin quartile computation modes.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@codecov-commenter

codecov-commenter commented Jul 1, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 56.93%. Comparing base (434bcae) to head (fafe3e3).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #6043      +/-   ##
============================================
- Coverage     56.93%   56.93%   -0.01%     
+ Complexity     3026     3025       -1     
============================================
  Files          1129     1129              
  Lines         43794    43794              
  Branches       4743     4743              
============================================
- Hits          24936    24934       -2     
- Misses        17384    17385       +1     
- Partials       1474     1475       +1     
Flag Coverage Δ *Carryforward flag
access-control-service 70.00% <ø> (ø)
agent-service 44.59% <ø> (ø) Carriedforward from 434bcae
amber 58.75% <ø> (-0.02%) ⬇️
computing-unit-managing-service 0.00% <ø> (ø)
config-service 52.30% <ø> (ø)
file-service 62.81% <ø> (ø)
frontend 50.12% <ø> (ø) Carriedforward from 434bcae
notebook-migration-service 78.57% <ø> (ø)
pyamber 90.20% <ø> (ø) Carriedforward from 434bcae
python 90.76% <ø> (ø) Carriedforward from 434bcae
workflow-compiling-service 55.14% <ø> (ø)

*This pull request uses carry forward flags. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions

github-actions Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

⚠️ Benchmark changes need a look

🟢 0 better · 🔴 7 worse · ⚪ 8 noise (<±5%) · 0 without baseline

Compared against main 434bcae benchmarked on this same runner, so the delta is largely free of cross-runner hardware noise. The "7d avg" column still reflects the gh-pages dashboard. Treat <±5% as noise unless repeated.

Dashboard · Run

config throughput MB/s latency max Δ latest / 7d
🔴 bs=10 sw=10 sl=64 410 0.25 22,918/35,195/35,195 us 🔴 +19.1% / 🔴 +133.5%
🔴 bs=100 sw=10 sl=64 944 0.576 104,876/134,307/134,307 us 🔴 +5.4% / 🔴 +24.8%
bs=1000 sw=10 sl=64 1,090 0.665 921,644/955,630/955,630 us ⚪ within ±5% / 🟢 -9.7%
Baseline details

Latest main 434bcae from same runner

config metric PR latest main 7d avg Δ latest Δ 7d
bs=10 sw=10 sl=64 throughput 410 tuples/sec 449 tuples/sec 777.62 tuples/sec -8.7% -47.3%
bs=10 sw=10 sl=64 MB/s 0.25 MB/s 0.274 MB/s 0.475 MB/s -8.8% -47.3%
bs=10 sw=10 sl=64 p50 22,918 us 21,707 us 12,612 us +5.6% +81.7%
bs=10 sw=10 sl=64 p95 35,195 us 29,556 us 15,070 us +19.1% +133.5%
bs=10 sw=10 sl=64 p99 35,195 us 29,556 us 18,360 us +19.1% +91.7%
bs=100 sw=10 sl=64 throughput 944 tuples/sec 952 tuples/sec 988.31 tuples/sec -0.8% -4.5%
bs=100 sw=10 sl=64 MB/s 0.576 MB/s 0.581 MB/s 0.603 MB/s -0.9% -4.5%
bs=100 sw=10 sl=64 p50 104,876 us 103,340 us 101,066 us +1.5% +3.8%
bs=100 sw=10 sl=64 p95 134,307 us 127,372 us 107,594 us +5.4% +24.8%
bs=100 sw=10 sl=64 p99 134,307 us 127,372 us 115,830 us +5.4% +16.0%
bs=1000 sw=10 sl=64 throughput 1,090 tuples/sec 1,102 tuples/sec 1,019 tuples/sec -1.1% +6.9%
bs=1000 sw=10 sl=64 MB/s 0.665 MB/s 0.673 MB/s 0.622 MB/s -1.2% +6.9%
bs=1000 sw=10 sl=64 p50 921,644 us 908,151 us 986,982 us +1.5% -6.6%
bs=1000 sw=10 sl=64 p95 955,630 us 956,512 us 1,028,491 us -0.1% -7.1%
bs=1000 sw=10 sl=64 p99 955,630 us 956,512 us 1,058,493 us -0.1% -9.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,487.74,200,128000,410,0.250,22918.15,35194.86,35194.86
1,100,10,64,20,2117.71,2000,1280000,944,0.576,104875.58,134307.22,134307.22
2,1000,10,64,20,18346.69,20000,12800000,1090,0.665,921643.60,955629.68,955629.68

@aglinxinyuan aglinxinyuan requested a review from mengw15 July 1, 2026 04:55

@mengw15 mengw15 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Yicong-Huang

Copy link
Copy Markdown
Contributor

does this PR improve test coverage? @aglinxinyuan. Seems that 300 lines of new tests add coverage on only 1 src line. Let's try to fill up the coverage on the untested code path first.

Screenshot 2026-07-01 at 1 02 58 AM

@aglinxinyuan

Copy link
Copy Markdown
Contributor Author

Let's skip this for now since it doesn't improve coverage much.

aglinxinyuan added a commit to aglinxinyuan/texera that referenced this pull request Jul 2, 2026
…nd dual-port UDF classes (apache#6057)

### What changes were proposed in this PR?

Fill uncovered code paths in three `workflow-operator` classes, selected
from the Codecov report. No production-code changes.

| File | Codecov before | Missed lines targeted |
| --- | --- | --- |
| `FilterPredicate.java` | 40.0% | 26 — the remaining `evaluate`
branches: GE/LT operators, null-field short-circuit, IS_NULL both ways,
boolean (case-insensitive), double, long, and timestamp evaluators, the
numeric-string fast path, and the `equals` identity/null/other-type
branches |
| `BufferedBlockReader.java` | 0% | 51 (whole class) — delimiter
splitting, EOF flush (incl. kept-filter bypass), CR terminators and the
CRLF single-null artifact, empty fields → null, fields spanning buffer
reads, delimiter-at-buffer-start carry, kept-index filtering, `hasNext`
block-boundary semantics, `close` |
| `DualInputPortsPythonUDFOpDescV2.scala` | 40.0% | 27 — the entire
`getPhysicalOp`: worker precondition, env-name resolution
(default/blank-reject/trim), single vs parallel wiring,
unknown-partition derivation, and the port-1-drives-output schema
propagation incl. the duplicate-column rejection |

Extends the existing `FilterPredicateSpec` and adds
`BufferedBlockReaderSpec` (with a chunked-stream stub to force
buffer-boundary paths) and `DualInputPortsPythonUDFOpDescV2Spec`.

### Any related issues, documentation, discussions?

Follow-up to the review feedback on apache#6043: prioritize tests that fill
uncovered code paths.

### How was this PR tested?

- `sbt "WorkflowOperator/testOnly *FilterPredicateSpec
*BufferedBlockReaderSpec *DualInputPortsPythonUDFOpDescV2Spec"` — 39
tests, all green
- `sbt "WorkflowOperator/Test/scalafmtCheck"` and `sbt
"WorkflowOperator/scalafixAll --check"` — clean
- CI + Codecov delta to confirm

### Was this PR authored or co-authored using generative AI tooling?

Generated-by: Claude Code (Opus 4.8 [1M context])
aglinxinyuan added a commit to aglinxinyuan/texera that referenced this pull request Jul 2, 2026
…ies (apache#6055)

### What changes were proposed in this PR?

Fill uncovered code paths in five `workflow-core` tuple/type utility
classes, selected from the Codecov report (not spec-name gaps). No
production-code changes.

| File | Codecov before | Missed lines targeted |
| --- | --- | --- |
| `Tuple.scala` | 54.1% | 24 — `getField` miss/Attribute overload,
`enforceSchema`, equals branches (incl. binary contents / non-Tuple),
`getPartialTuple`, `toString`, size/type-mismatch throws, 3-arg builder
`add` + null guards, case-class synthetics |
| `TupleLike.scala` | 12.8% | 32 — `SeqTupleLike`/`MapTupleLike`
`enforceSchema` (positional vs name-based, null fill, extras dropped),
`inMemSize` `???`, all seven `TupleLike.apply` overloads, the
`NotAnIterable` guard implicit |
| `AttributeType.java` | 47.2% | 18 — `getName` ANY branch (`""`), the
full `getAttributeType(Class)` mapping incl. primitive/unknown fallback
to ANY |
| `AttributeTypeUtils.scala` | 71.7% | 20 (+29 partials) —
`SchemaCasting`, `tupleCasting`, both `parseFields` overloads,
null-inference early-returns, BINARY/ANY inference fallback, LONG/DOUBLE
`compare`, unsupported-type throws, forced-parse failures |
| `ArrowUtils.scala` | 67.8% | 15 —
`appendTexeraTuple`/`setTexeraTuple`/`getTexeraTuple` round-trip (all 7
types + nulls + row indices), parse-failure → null field,
`fromAttributeType(null)` throw, unrecognized `texera_type` metadata
fallback |

Extends the existing `TupleSpec`, `AttributeTypeUtilsSpec`, and
`ArrowUtilsSpec` (the operator-module `ArrowUtilsSpec` doesn't attribute
coverage to `workflow-core` sources), and adds `TupleLikeSpec` /
`AttributeTypeSpec`.

Behavior notes pinned along the way: `$attrType` error messages render
the lowercase wire name; the `NotAnIterable` iterable-guard implicit is
not summoned for multi-iterable varargs under Scala 2.13 inference
(pinned by direct invocation).

### Any related issues, documentation, discussions?

Follow-up to the review feedback on apache#6043: prioritize tests that fill
uncovered code paths.

### How was this PR tested?

- `sbt "WorkflowCore/testOnly *TupleSpec *TupleLikeSpec
*AttributeTypeSpec *AttributeTypeUtilsSpec
org.apache.texera.amber.util.ArrowUtilsSpec"` — 105 tests, all green
- `sbt "WorkflowCore/Test/scalafmtCheck"` and `sbt
"WorkflowCore/scalafixAll --check"` — clean
- CI + Codecov delta to confirm

### Was this PR authored or co-authored using generative AI tooling?

Generated-by: Claude Code (Opus 4.8 [1M context])
aglinxinyuan added a commit to aglinxinyuan/texera that referenced this pull request Jul 3, 2026
…icalOp (apache#6056)

### What changes were proposed in this PR?

Add unit test coverage for the two largest uncovered files in
`workflow-core` per the Codecov report. No production-code changes.

| File | Codecov before | Missed lines targeted |
| --- | --- | --- |
| `PhysicalPlan.scala` | 27.0% | 71 — `addOperator`/`addLink` (incl.
schema hand-off + undeclared-port rejection), `removeLink`,
`setOperator`, `getPhysicalOpByWorkerId`, `getLinksBetween`,
`getOutputPartitionInfo` (all three branches), blocking/dependee link
detection, `getDependeeLinksRemovedDAG`, `getNonBridgeNonBlockingLinks`
(bridge vs diamond), `maxChains` (maximal-subset filter),
`layeredReversedTopologicalOrder` (diamond, parallel edges, empty),
plan-level `propagateSchema` |
| `PhysicalOp.scala` | 46.2% | 66 — the Java-function
`SchemaPropagationFunc` wrapper, all four factory families
(`source`/`oneToOne`/`manyToOne`/`local`, both overloads each),
`dependeeInputs`/`isInputLinkDependee`, `isPythonBased`/`getCode`,
`withPartitionRequirement`/`withDerivePartition`/`withIsOneToManyOp`/`withPveName`,
partial-schema propagation gating, `getInputPortDependencyPairs`,
`addOutputLink` guards, primary-constructor defaults |

New `PhysicalPlanSpec` and `PhysicalOpSpec` in `workflow-core` (no name
clash repo-wide); deliberately does not duplicate the `PhysicalOp`/plan
surfaces already covered by `WorkflowCoreTypesSpec`.

### Any related issues, documentation, discussions?

Follow-up to the review feedback on apache#6043: prioritize tests that fill
uncovered code paths.

### How was this PR tested?

- `sbt "WorkflowCore/testOnly *PhysicalPlanSpec *PhysicalOpSpec"` — 38
tests, all green
- `sbt "WorkflowCore/Test/scalafmtCheck"` and `sbt
"WorkflowCore/scalafixAll --check"` — clean
- CI + Codecov delta to confirm

### Was this PR authored or co-authored using generative AI tooling?

Generated-by: Claude Code (Opus 4.8 [1M context])
kunwp1 pushed a commit to kunwp1/texera that referenced this pull request Jul 3, 2026
…utilities (apache#6077)

### What changes were proposed in this PR?

Add unit test coverage for three `workflow-operator` support utilities,
selected from the Codecov report. No production-code changes.

| File | Codecov before | Missed lines targeted |
| --- | --- | --- |
| `TestOperators.scala` | 26.3% | 56 — every desc-factory helper
(CSV/JSONL scans, hash-join, keyword-search, aggregate + group-by,
AsterixDB source, python & python-source UDFs); asserts the returned
descriptors' fields |
| `SpecialPhysicalOpFactory.scala` | 0% | 17 — `newSourcePhysicalOp`:
decoded-port identity derivation, layer-name interpolation (incl.
dash→underscore), empty input ports, output port + schema propagation,
and the no-port-id failure |
| `FileScanUtils.scala` | 62.9% | 11 — the `extract == true` archive
branch of `createTuplesFromFile`: zip-entry iteration, `__MACOSX`
filtering, single-string vs per-line attribute paths |

`TestOperators` is itself a shared test-helper factory (in `src/main`)
used by many specs, but nothing asserted on its output, so its bodies
read as uncovered. All tests run in-memory or against local temp files /
committed test resources.

### Any related issues, documentation, discussions?

Follow-up to the review feedback on apache#6043: prioritize tests that fill
uncovered code paths.

### How was this PR tested?

- `sbt "WorkflowOperator/testOnly *TestOperatorsSpec
*SpecialPhysicalOpFactorySpec *FileScanUtilsSpec"` — 16 tests, all green
- `sbt "WorkflowOperator/Test/scalafmtCheck"` and `sbt
"WorkflowOperator/scalafixAll --check"` — clean

### Was this PR authored or co-authored using generative AI tooling?

Generated-by: Claude Code (Opus 4.8 [1M context])
kunwp1 pushed a commit to kunwp1/texera that referenced this pull request Jul 3, 2026
…tors (apache#6076)

### What changes were proposed in this PR?

Add unit test coverage for the four file-reading scan source
**executors**, selected from the Codecov report. No production-code
changes. Every test is driven by a local temp file (`file:` URI →
`ReadonlyLocalFileDocument`); no live DB/network/S3/Iceberg.

| File | Codecov before | Missed lines targeted |
| --- | --- | --- |
| `ParallelCSVScanSourceOpExec.scala` | 0% | 43 — construct + schema
init, `open` byte-range partitioning (both `endOffset` branches +
mid-file partial-line skip + header skip), `produceTuple` happy path,
short-row null padding, all-null (blank) line discard, `close` |
| `JSONLScanSourceOpExec.scala` | 0% | 23 — construct, `produceTuple`,
`open` line counting + worker partitioning (both ternary branches), row
limit, `close` |
| `CSVOldScanSourceOpExec.scala` | 0% | 21 — construct + header-based
schema, `open` (header vs no-header start offset), `produceTuple` +
limit, `close` null-guard before open |
| `ArrowSourceOpExec.scala` | 0% | 30 — construct, `open` success +
error-wrapping path, `produceTuple` batch iteration + offset/limit,
`close` no-op before open |

New specs live in each executor's own package so their `private[...]`
constructors are reachable, mirroring the existing
`FileScanSourceOpExecSpec` temp-file/URI pattern.

### Any related issues, documentation, discussions?

Follow-up to the review feedback on apache#6043: prioritize tests that fill
uncovered code paths.

### How was this PR tested?

- `sbt "WorkflowOperator/testOnly *ParallelCSVScanSourceOpExecSpec
*JSONLScanSourceOpExecSpec *CSVOldScanSourceOpExecSpec
*ArrowSourceOpExecSpec"` — 17 tests, all green
- `sbt "WorkflowOperator/Test/scalafmtCheck"` and `sbt
"WorkflowOperator/scalafixAll --check"` — clean

### Was this PR authored or co-authored using generative AI tooling?

Generated-by: Claude Code (Opus 4.8 [1M context])
Yicong-Huang pushed a commit to Yicong-Huang/texera that referenced this pull request Jul 4, 2026
…chema introspection (apache#6078)

### What changes were proposed in this PR?

Add unit test coverage for `SQLSourceOpDesc.querySchema` — the abstract
SQL source descriptor's JDBC schema-introspection path — selected from
the Codecov report. No production-code changes.

`SQLSourceOpDesc` (40.5% covered) is abstract; its concrete subclasses
(MySQL/PostgreSQL/AsterixDB) never exercise `querySchema` because their
specs supply no connection. The 27 missed lines are covered here via a
small test subclass whose `establishConn` returns **ScalaMock-backed**
`java.sql.Connection`/`DatabaseMetaData`/`ResultSet` — no live database.

Covered:
- the connection-field null guard (returns `null` until all fields set)
- every JDBC-`Types` → `AttributeType` mapping arm (INTEGER/SMALLINT,
DOUBLE/NUMERIC, BOOLEAN, BINARY, VARCHAR, BIGINT, TIMESTAMP)
- default-port resolution via `updatePort()` and multi-column iteration
- the unknown-data-type `RuntimeException`
- the `SQLException` → wrapped-`RuntimeException` catch
- the abstract base `establishConn` default (returns no connection →
`NullPointerException`)

### Any related issues, documentation, discussions?

Follow-up to the review feedback on apache#6043: prioritize tests that fill
uncovered code paths.

### How was this PR tested?

- `sbt "WorkflowOperator/testOnly *SQLSourceOpDescSpec"` — 16 tests, all
green
- `sbt "WorkflowOperator/Test/scalafmtCheck"` and `sbt
"WorkflowOperator/scalafixAll --check"` — clean

### Was this PR authored or co-authored using generative AI tooling?

Generated-by: Claude Code (Opus 4.8 [1M context])
Yicong-Huang pushed a commit to Yicong-Huang/texera that referenced this pull request Jul 4, 2026
… descriptors (apache#6085)

### What changes were proposed in this PR?

Fill uncovered branches in the Java/R/Python UDF descriptors, selected
from the Codecov report. No production-code changes — extends the
existing specs (nothing duplicated).

| File | Codecov before | Missed branches now covered |
| --- | --- | --- |
| `JavaUDFOpDesc.scala` | 61.1% | `getPhysicalOp` workers>1
(parallelizable, one-to-many, suggested workers); custom
`inputPorts`/`outputPorts` in `operatorInfo` + partitionRequirement;
`runtimeReconfiguration` |
| `RUDFOpDesc.scala` | 66.7% | `r-tuple` language selection + workers>1
branch; custom-port `operatorInfo` + partitionRequirement;
`runtimeReconfiguration` |
| `PythonUDFOpDescV2.scala` | 72.4% | workers>1 one-to-one branch;
trimmed `pveName`; custom `inputPorts`/`outputPorts` (incl.
dependencies); `runtimeReconfiguration` |

The existing specs only exercised the default `workers=1` /
null-`inputPorts` paths, so these are the untested branch sides.

### Any related issues, documentation, discussions?

Follow-up to the review feedback on apache#6043: prioritize tests that fill
uncovered code paths.

### How was this PR tested?

- `sbt "WorkflowOperator/testOnly *JavaUDFOpDescSpec *RUDFOpDescSpec
*PythonUDFOpDescV2Spec"` — all green
- `sbt "WorkflowOperator/Test/scalafmtCheck"` and `sbt
"WorkflowOperator/scalafixAll --check"` — clean

### Was this PR authored or co-authored using generative AI tooling?

Generated-by: Claude Code (Opus 4.8 [1M context])
Yicong-Huang pushed a commit to Yicong-Huang/texera that referenced this pull request Jul 4, 2026
…Config, and AuthConfig (apache#6084)

### What changes were proposed in this PR?

Add unit test coverage for three more `common/config` objects, selected
from the Codecov report (all 0%). No production-code changes.

| File | Codecov before | What the tests pin |
| --- | --- | --- |
| `KubernetesConfig.scala` | 0% | the fixed port, string/numeric/boolean
settings, and comma-separated CPU/memory/GPU limit-option parsing
(trimmed, non-empty) |
| `UserSystemConfig.scala` | 0% | admin/google/smtp/project defaults,
the version-collapse interval (name≠key), and the `appDomain` `None`
path for a blank domain |
| `AuthConfig.scala` | 0% | `jwtExpirationMinutes`, the configured
lowercased secret + memoization, and `getRandomHexString` (32-char
lowercase hex, fresh per call) via reflection |

Reading each value forces resolution from the backing `.conf`;
env-overridable values are guarded on the env var being unset (mirroring
`StorageConfigSpec`). The random-secret branch is exercised directly
rather than through the env-dependent `"random"` path.

### Any related issues, documentation, discussions?

Follow-up to the review feedback on apache#6043: prioritize tests that fill
uncovered code paths.

### How was this PR tested?

- `sbt "Config/testOnly *KubernetesConfigSpec *UserSystemConfigSpec
*AuthConfigSpec"` — 10 tests, all green
- `sbt "Config/Test/scalafmtCheck"` and `sbt "Config/scalafixAll
--check"` — clean

### Was this PR authored or co-authored using generative AI tooling?

Generated-by: Claude Code (Opus 4.8 [1M context])
Yicong-Huang pushed a commit to Yicong-Huang/texera that referenced this pull request Jul 4, 2026
…, and EnvironmentalVariable (apache#6083)

### What changes were proposed in this PR?

Add unit test coverage for three `common/config` objects, selected from
the Codecov report (all 0%). No production-code changes.

| File | Codecov before | What the tests pin |
| --- | --- | --- |
| `EnvironmentalVariable.scala` | 0% | every env-var-name constant
resolves, is non-empty, and is unique; `get` returns `None`/`Some` for
unset/set vars |
| `ApplicationConfig.scala` | 0% | every value resolves from
application.conf with its default (constants, flow-control,
network-buffering, reconfiguration, fault-tolerance, scheduling,
cleanup, web-server, ai-assistant) |
| `GuiConfig.scala` | 0% | every gui.conf boolean/string/int setting
resolves to its default |

Reading each value forces resolution from the backing `.conf`, so a
renamed or mistyped key surfaces here as a `ConfigException` instead of
at service start-up. Every key carries a `${?ENV}` override, so
exact-value assertions are guarded on the env var being unset —
mirroring the existing `StorageConfigSpec`.

### Any related issues, documentation, discussions?

Follow-up to the review feedback on apache#6043: prioritize tests that fill
uncovered code paths.

### How was this PR tested?

- `sbt "Config/testOnly *EnvironmentalVariableSpec
*ApplicationConfigSpec *GuiConfigSpec"` — 16 tests, all green
- `sbt "Config/Test/scalafmtCheck"` and `sbt "Config/scalafixAll
--check"` — clean

### Was this PR authored or co-authored using generative AI tooling?

Generated-by: Claude Code (Opus 4.8 [1M context])
Yicong-Huang pushed a commit to Yicong-Huang/texera that referenced this pull request Jul 4, 2026
…apache#6095)

### What changes were proposed in this PR?

Add unit test coverage for three `common/workflow-core` storage-model
classes, selected from the Codecov report (all 0%). No production-code
changes.

| File | Codecov before | What the tests pin |
| --- | --- | --- |
| `ResultSchema.scala` | 0% | the runtime-statistics schema's 11 columns
(names + types, in order) and the single-column console-messages schema
|
| `ReadonlyLocalFileDocument.scala` | 0% | URI/file accessors and
input-stream read against a local temp file, plus each unsupported
collection accessor throwing its exact message |
| `VirtualDocument.scala` | 6.2% | every default method
(read/write/file/stat) throws `NotImplementedError` with its exact
message, via a minimal concrete subclass |

### Any related issues, documentation, discussions?

Follow-up to the review feedback on apache#6043: prioritize tests that fill
uncovered code paths.

### How was this PR tested?

- `sbt "WorkflowCore/testOnly *ResultSchemaSpec
*ReadonlyLocalFileDocumentSpec *VirtualDocumentSpec"` — 20 tests, all
green
- `sbt "WorkflowCore/Test/scalafmtCheck"` and `sbt
"WorkflowCore/scalafixAll --check"` — clean

### Was this PR authored or co-authored using generative AI tooling?

Generated-by: Claude Code (Opus 4.8 [1M context])
Yicong-Huang pushed a commit to Yicong-Huang/texera that referenced this pull request Jul 4, 2026
…apache#6094)

### What changes were proposed in this PR?

Add unit test coverage for the remaining `common/config` objects,
selected from the Codecov report (all 0%). No production-code changes.

| File | Codecov before | What the tests pin |
| --- | --- | --- |
| `UdfConfig.scala` | 0% | python/R path + log handler defaults from
udf.conf |
| `DefaultsConfig.scala` | 0% | the `reinit` flag and the flattened
`allDefaults` short-key/value map from default.conf |
| `ComputingUnitConfig.scala` | 0% | local/sharing enabled flags |
| `LLMConfig.scala` | 0% | LiteLLM base URL + master key |
| `PekkoConfig.scala` | 0% | actor/serialization, remote/artery, and
cluster/failure-detector settings from cluster.conf (no ActorSystem
started) |
| `PythonUtils.scala` | 0% | `getPythonExecutable` blank→`python3`
fallback and trimmed-path branch |

Reading each value forces resolution from the backing `.conf`;
env/system-property-overridable values are guarded on the override being
unset (mirroring `StorageConfigSpec`).

### Any related issues, documentation, discussions?

Follow-up to the review feedback on apache#6043: prioritize tests that fill
uncovered code paths.

### How was this PR tested?

- `sbt "Config/testOnly *UdfConfigSpec *DefaultsConfigSpec
*ComputingUnitConfigSpec *LLMConfigSpec *PekkoConfigSpec
*PythonUtilsSpec"` — 13 tests, all green
- `sbt "Config/Test/scalafmtCheck"` and `sbt "Config/scalafixAll
--check"` — clean

### Was this PR authored or co-authored using generative AI tooling?

Generated-by: Claude Code (Opus 4.8 [1M context])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants