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

   ### What changes were proposed in this PR?
   
   In 
`common/workflow-operator/src/test/scala/org/apache/texera/amber/operator/source/scan/file/FileScanUtilsSpec.scala`:
   1. Add a `scan(...)` test helper providing canonical default arguments 
(`displayFileName = "d"`, `attributeType = FileAttributeType.STRING`, 
`fileEncoding = FileDecodingMethod.UTF_8`, `extract = false`, `outputFileName = 
false`, `fileScanOffset = None`, `fileScanLimit = None`) around 
`FileScanUtils.createTuplesFromFile`.
   2. Deduplicate 11 `createTuplesFromFile` test cases by adopting the 
`scan(...)` helper instead of repeating lengthy 8-argument parameter lists.
   3. Add a `memoryFailureMessage(...)` test helper to encapsulate the 
`safeToByteArray` error interception across 5 memory guard test cases.
   
   All 18 test cases, docstrings, assertions, and edge-case verifications are 
preserved untouched.
   
   ### Any related issues, documentation, discussions?
   
   Closes #9216
   
   ### How was this PR tested?
   
   Verified with sbt unit tests, operator metadata tests, and linters:
   ```bash
   sbt "WorkflowOperator/testOnly 
org.apache.texera.amber.operator.source.scan.file.FileScanUtilsSpec"
   sbt "WorkflowOperator/testOnly org.apache.texera.amber.operator.metadata.*"
   sbt "WorkflowOperator/scalafmtCheck" "WorkflowOperator/Test/scalafmtCheck" 
"WorkflowOperator/scalafix --check" "WorkflowOperator/Test/scalafix --check"
   ```
   All 18 tests in `FileScanUtilsSpec` passed, all 229 operator metadata tests 
passed, and all scalafmt / scalafix checks passed.
   
   ### Was this PR authored or co-authored using generative AI tooling?
   
   Generated-by: Antigravity (Gemini 2.5 Pro)
   


-- 
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