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

   ### What changes were proposed in this PR?
   
   Extends `WorkflowCompilingServiceRunSpec` to actually exercise
   `WorkflowCompilingService.run`, which had no coverage — the spec previously 
only
   asserted role annotations on the resource classes. No production code was
   changed.
   
   Following `AccessControlServiceRunSpec` (the template the issue points at), a
   mocked Dropwizard `Environment` is handed to `run(config, env)` and the 
wiring it
   installs is verified, without starting a server:
   
   - `jersey.setUrlPattern("/api/*")`
   - `jersey.register(classOf[HealthCheckResource])` and
     `jersey.register(classOf[WorkflowCompilationResource])`
   - the auth stack from `AuthFeatures.register` — asserted through the
     `RolesAllowedDynamicFeature` and `UnauthorizedExceptionMapper` it registers
     (without the former Jersey silently ignores `@RolesAllowed`)
   - the request-logging filter added to the application context
   
   The existing role-annotation assertion is kept.
   
   Per the issue's scope note, only `run()` is covered — `initialize()`, 
`main()`
   and the config/connection helpers are left alone since #5983 moves that
   boilerplate into a shared `ServiceBootstrap`.
   
   One thing worth noting for reviewers: `run()` calls 
`SqlServer.initConnection`,
   which is safe here because it only constructs the `SqlServer` (the pool 
connects
   lazily) — the same call is made by `AccessControlService.run`, whose spec 
already
   runs this way in CI.
   
   ### Any related issues, documentation, discussions?
   
   Closes #7557
   
   ### How was this PR tested?
   
   Unit tests, run locally. All pass, and the failure path was verified by 
breaking
   an assertion to confirm the suite goes red:
   
   ```
   sbt "WorkflowCompilingService/testOnly *WorkflowCompilingServiceRunSpec"
   # Tests: succeeded 5, failed 0
   sbt "WorkflowCompilingService/Test/scalafmtCheck"      # clean
   sbt "WorkflowCompilingService/Test/scalafix --check"   # clean
   ```
   
   ### Was this PR authored or co-authored using generative AI tooling?
   
   Generated-by: Claude Code (Opus 4.8 [1M context])
   


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