zyratlo commented on PR #5258:
URL: https://github.com/apache/texera/pull/5258#issuecomment-4772565625

   > also please add more test cases
   
   Added more test cases, summary of leftover lines: 
   
   NotebookMigrationResource.scala — 100% line coverage. Every reachable branch 
is tested, including the Jupyter HTTP paths (via a stub HttpServer on the 
configured port), the write-access gate, and the malformed-input and 
unreachable-server failure paths. The only branches Codecov still flags as 
partial are unreachable by design:
   
   - The NonFatal catch blocks — the missed branch is the fatal Throwable path 
that NonFatal deliberately does not catch.
   - The @Auth resource-method wrappers — synthetic Scala/jacoco branches 
(parameter/entry artifacts), not real code paths.
   - Object initialization and the conn == null guard in isJupyterAvailable 
(reached only if openConnection throws before assignment).
   
   NotebookMigrationService.scala — run() and registerAuthFeatures are tested 
(mocked Dropwizard Environment, mirroring AccessControlServiceRunSpec). 
initialize() and main() are left untested: they stand up the real application 
and open the live JDBC connection, so they aren't unit-testable — consistent 
with the other Dropwizard services, which test run() only.
   
   StorageConfig.scala / NotebookMigrationServiceConfiguration.scala — the 
flagged lines are config field declarations; their coverage is attributed to 
other modules' flags and can't be exercised from this service's tests.


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