aglinxinyuan opened a new pull request, #5403:
URL: https://github.com/apache/texera/pull/5403

   ### What changes were proposed in this PR?
   
   Adds `EngineCommonConversionsSpec` covering two 
`org.apache.texera.amber.engine.common` conversion helpers. Bundled because 
both files are short, both deal with engine-level value-shape conversions, and 
a single suite is the right level of focus.
   
   | File | Behavior pinned |
   | --- | --- |
   | `FutureBijection.scala` | `RichTwitterFuture.asScala`: 
`TwitterFuture.value` resolves Scala success; `TwitterFuture.exception` fails 
Scala with the original exception (`eq` identity, no rewrapping); async 
propagation via a Twitter `Promise` resolved after conversion. 
`RichScalaFuture.asTwitter`: `Scala.successful` / `Scala.failed` mirror the 
above; async propagation via a Scala `Promise`; a never-completing Scala 
`Promise` leaves the Twitter side un-resolved (verified with a short 
`TwitterAwait` throwing `TimeoutException`). |
   | `SerializedState.scala` | The five wire-format key constants 
(`CP_STATE_KEY` / `DP_STATE_KEY` / `IN_FLIGHT_MSG_KEY` / `DP_QUEUED_MSG_KEY` / 
`OUTPUT_MSG_KEY`) — a rename would silently break checkpoint files written 
under the old names. `fromObject` captures non-empty bytes + non-negative 
`serializerId` + non-null `manifest`. Round-trip via `toObject` preserves value 
equality for a case class (top-level on the companion, intentionally not nested 
so Kryo doesn't try to serialize a captured outer reference), a boxed 
`Integer`, and an immutable `Map[String, Int]`. `size()` equals `bytes.length` 
for populated and empty `SerializedState` values. |
   
   The suite owns a suite-local Pekko `ActorSystem` injected into 
`Serialization`, torn down via `TestKit.shutdownActorSystem` in `afterAll` so 
no Pekko threads outlive the run (same pattern as `CheckpointSubsystemSpec`).
   
   No production code changed; this is test-only.
   
   ### Any related issues, documentation, discussions?
   
   Closes #5398
   
   ### How was this PR tested?
   
   ```
   sbt "WorkflowExecutionService/Test/testOnly 
org.apache.texera.amber.engine.common.EngineCommonConversionsSpec"
   # → 14 tests, all pass
   
   sbt "WorkflowExecutionService/Test/scalafmtCheck"
   # → clean
   ```
   
   ### Was this PR authored or co-authored using generative AI tooling?
   
   Generated-by: Claude Code (Claude Opus 4.7)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to