Skip to content

Fix the unit test job: run the display cutout test on the same SDK as the rest - #6855

Merged
AndyScherzinger merged 1 commit into
masterfrom
fix/noid/display-cutout-test-sdk
Oct 12, 2026
Merged

AndyScherzinger merged 1 commit into
masterfrom
fix/noid/display-cutout-test-sdk

Conversation

@AndyScherzinger

@AndyScherzinger AndyScherzinger commented Oct 12, 2026 •

Copy link
Copy Markdown
Member

Merge order: this one first, then #6854. This PR is what turns the unit test job green again. #6854 caches the Robolectric SDK jars so the download stops happening at all, but it can do nothing until a run has gone green at least once, because actions/cache only writes its cache on a successful job. Merging #6854 before this one has literally no effect.

master's unit test job has been failing since 2026-10-07, and every pull request opened since inherits it. The last green run was e75dbd27e; everything after it is red, which is long enough that the failure now reads as background noise rather than a broken build.

DisplayCutoutPaddingTest > initializationError FAILED
  java.lang.AssertionError at MavenArtifactFetcher.java:129
    Caused by: javax.net.ssl.SSLException at Alert.java:132
      Caused by: java.lang.RuntimeException at XDHKeyExchange.java:109
        Caused by: java.security.InvalidAlgorithmParameterException at OpenSSLXDHKeyPairGenerator.java:58

Robolectric does not take its android-all jars through Gradle; it downloads one per distinct SDK level the suite asks for, straight from Maven Central, the first time a test needs it. This suite asks for exactly two levels: 33, used by twelve tests, and 31, used only by DisplayCutoutPaddingTest. The jar for 33 downloads fine — those twelve tests run. The one for 31 dies in the TLS handshake, and because it dies while the runner is still initialising, it surfaces as initializationError with no assertion in the log to point at. That is why it looks like a flake. It is not: it has failed nine runs in a row, and in under a minute each time.

Nothing in the test depends on 31. It dispatches a WindowInsetsCompat carrying a displayCutout() inset and asserts the resulting padding; WindowInsetsCompat is a Jetpack compat shim that dispatches identically on both levels, and display cutouts are API 28+, so both are well clear of the floor. Every other Robolectric test in the repository already uses 33. Running on 33 means the suite needs only the jar it already fetched successfully, so there is no second download to fail.

Verified locally: both assertions pass on 33 (BUILD SUCCESSFUL).

This does not repair the underlying TLS failure — Conscrypt's X25519 key generation, from conscrypt-openjdk-uber on the test classpath — it removes the second download that trips over it. Adding a thirteenth SDK level later would bring the problem back. #6854 attacks the same problem from the other side by caching the jars, but it cannot help until a run goes green first, since actions/cache only saves on success. This one has to land first.

🏁 Checklist

  • ⛑️ Tests (unit and/or integration) are included or not needed
  • 🔖 Capability is checked or not needed
  • 🔙 Backport requests are created or not needed: /backport to stable-xx.x
  • 📅 Milestone is set
  • 🌸 PR title is meaningful (if it should be in the changelog: is it meaningful to users?)

🤖 AI (if applicable)

  • The content of this PR was partly or fully generated using AI

`DisplayCutoutPaddingTest` is the only Robolectric test in the suite
pinned to SDK 31; the other twelve all run on 33. That makes the run
fetch a second `android-all` jar, and the download of that one has been
failing on CI since the test landed, taking the whole suite down with it
in `initializationError` before any assertion runs.

Nothing in the test depends on 31. Window insets are dispatched the same
way on both levels, so the behaviour under test is unchanged.

Assisted-by: Claude Code:claude-opus-5
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
@AndyScherzinger AndyScherzinger self-assigned this Oct 12, 2026
@AndyScherzinger AndyScherzinger added this to the 25.1.0 milestone Oct 12, 2026
@coderabbitai

coderabbitai Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: bd079ccf-334b-48d9-b14f-a17d9a156e9a


📥 Commits

Reviewing files that changed from the base of the PR and between 91dded3 and f1c0ed7.



📒 Files selected for processing (1)
  • app/src/test/java/com/nextcloud/talk/utils/DisplayCutoutPaddingTest.kt


Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 3 remain after this review.




📝 Walkthrough
📝 Walkthrough

Walkthrough

The display cutout padding test now targets Robolectric SDK 33 instead of SDK 31.



Priority: ⬇️ Low

Merge Risk: ⚪ Minimal · up to f1c0e

This change only selects SDK 33 for the display-cutout test. No supported evidence shows a merge-blocking regression, so it is ready for normal checks.

Pre-merge checks | Passed 4 | Failed 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 1 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Title check Passed The title clearly states that the display cutout test will use the same SDK as the other unit tests. It accurately describes the main change.
Description check Passed The description provides detailed failure context, explains the cause and scope of the change, reports local verification, and includes the checklist. The omitted Screenshots and TODO sections are not…

  • Fix all pre-merge checks with AI
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

Copy link
Copy Markdown
Contributor

📱 QA build

Download app-qa-debug.apk
QR code Open the QR code for this download
Commit f1c0ed7
Version 6855
Available until 7 days after this build

The QA build installs alongside a released Nextcloud app, so you can keep
using your existing install while testing.

Downloading the file requires a GitHub account, so open this link on the
device you want to test on, or transfer the APK to it.

@mahibi
mahibi self-requested a review October 12, 2026 09:23
@github-actions

Copy link
Copy Markdown
Contributor

Codacy

Lint

TypemasterPR
Warnings138138
Errors1515

SpotBugs

CategoryBaseNew
Bad practice77
Correctness1111
Dodgy code4040
Internationalization33
Malicious code vulnerability33
Performance88
Security1111
Total8383

@AndyScherzinger
AndyScherzinger merged commit 976034c into master Oct 12, 2026
20 checks passed
@AndyScherzinger
AndyScherzinger deleted the fix/noid/display-cutout-test-sdk branch October 12, 2026 10:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Waiting for reviews AI assisted

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants