Skip to content

test: coverage for Boot 3.5 upgrade (#1258) - #1260

Open
devin-ai-integration[bot] wants to merge 1 commit into
devin/task-24-revive-1185-boot-3.5from
devin/tests-for-pr-1258
Open

devin-ai-integration[bot] wants to merge 1 commit into
devin/task-24-revive-1185-boot-3.5from
devin/tests-for-pr-1258

Conversation

@devin-ai-integration

@devin-ai-integration devin-ai-integration Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

Summary

Adds tests for #1258's changed production code. Only test files change; targets #1258's head branch.

Not yet run. Gradle couldn't download the Boot 3.5, Spotless 6.25 and DGS 8.7 plugins on the build VM: the Maven Central mirror and plugins-artifacts.gradle.org are blocked, and repo.maven.apache.org returned HTTP 429. Run ./gradlew spotlessJavaApply test (Java 21) before merging. Assertions most likely to need adjusting: DGS default errorType (INTERNAL) and the CORS preflight status.

Boot3SecurityAndGraphQLIntegrationTest (new; full server on a random port, temp SQLite file)

  • GraphQLHttpConfig: POST /graphql parses its body while UNWRAP_ROOT_VALUE is on; POST /users still unwraps {"user":{...}}.
  • GraphQL createUser returns a JWT that GET /user accepts. A failed login returns errorType=UNAUTHENTICATED.
  • SecurityFilterChain over real HTTP:
    • anonymous GET /articles/does-not-exist returns 404, not 401 (checks the ERROR-dispatch permitAll)
    • anonymous /articles/feed, POST /articles and an invalid token return 401
    • /tags and /articles are public, and the CORS preflight is allowed

GraphQLCustomizeExceptionHandlerTest (new): unit tests for the DGS 10 handleException. Covers the auth error, the constraint violation (BAD_REQUEST with field errors in extensions) and fallback to the default handler.

DefaultJwtServiceTest (extended for jjwt 0.12):

  • rejects tokens signed with another secret, tampered tokens and alg:none tokens
  • signs with HS512 when the secret is production length
  • accepts an HS512 token issued before the upgrade
  • throws WeakKeyException for secrets under 256 bits

Link to Devin session: https://devin-gtm.devinenterprise.com/sessions/e996ce7a78f5461bb11c349f93da48ee
Open in Devin Desktop: https://devin-gtm.devinenterprise.com/desktop/session/e996ce7a78f5461bb11c349f93da48ee?variant=devin


Devin Review

@devin-ai-integration

Copy link
Copy Markdown
Author

I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".

  • Disable automatic comment, CI, and merge conflict monitoring

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Devin Review found 1 potential issue.

Custom reviewers

  • 🧪 Test 2 reviewer: no findings · View
  • 🚩 TD Enterprise Architecture: no findings · View
  • 👁️ TD Information Security: no findings · View
  • 🧠 TD French Language (Bill 96): no findings · View
  • ⏱️ TD API Contracts: no findings · View

Devin Review

Comment on lines +79 to +82
DataFetchingEnvironment env =
DataFetchingEnvironmentImpl.newDataFetchingEnvironment()
.executionStepInfo(stepInfo)
.build();

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

🔍 Fallback test fails before its assertions

In should_delegate_other_exceptions_to_default_handler, params supplies no merged field, causing a NullPointerException. DGS's DefaultDataFetcherExceptionHandler reads getSourceLocation(), which dereferences that field. The test never reaches its message or error-type assertions.

Devin Review


Was this helpful? React with 👍 or 👎 to provide feedback.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants