Skip to content

Inline Redisson namespace expectations in tests - #20486

Open
trask with Copilot wants to merge 2 commits into
mainfrom
copilot/redisson-namespace-expected-value-selection
Open

trask with Copilot wants to merge 2 commits into
mainfrom
copilot/redisson-namespace-expected-value-selection

Conversation

Copilot AI commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

A bounded part of the broader inline-expected-value cleanup: make Redisson database-index selection visible at the shared test assertions, preserving nullable expectations for versions without index support.

  • Assertions: Replace the private helper calls with inline expectations, retaining "0" and the configured "1" where applicable:
    equalTo(DB_NAMESPACE, hasDatabaseIndex() ? "0" : null)
  • Scope: Remove only the private expected-value helpers; keep capability hooks and other test behavior unchanged.
  • Overlap: PR Add logical spans for Redisson atomic batches #19204 also touches these test classes; its unmerged changes are not included here.
Original prompt

Inline short Redisson namespace expectations

Implement this bounded portion of #19984 and open one draft PR against main.

The user requested separate Copilot cloud coding-agent assignments and approved the short expected-value-helper cleanup. Conditional attribute-assertion-list rewrites are deferred. This task owns only Redisson namespace expected-value selection in two shared test classes.

Exact file allowlist

  • instrumentation\redisson\redisson-common-3.0\testing\src\main\java\io\opentelemetry\javaagent\instrumentation\redisson\AbstractRedissonClientTest.java
  • instrumentation\redisson\redisson-common-3.0\testing\src\main\java\io\opentelemetry\javaagent\instrumentation\redisson\AbstractRedissonAsyncClientTest.java

Paths are repository-relative and use Windows separators from the coordinating session. Resolve them appropriately in your execution environment.

Change and boundaries

Replace dbNamespace() and dbNamespace(databaseIndex) at assertion sites with inline hasDatabaseIndex() ? existingIndex : null expectations. Preserve the existing "0" and "1" values at their respective sites. Remove only the unused private expected-value helpers.

Keep hasDatabaseIndex() and its subclass overrides. Do not inline mode-accessor implementations, change batch behavior or fixture setup, rewrite connection-URL helpers, or modify exact attribute checks, span order, production code, build scripts, metadata, or documentation. Do not rewrite conditional assertion lists or the established experimental(value) exception.

PR #19204 is still open and changes these test classes. This assignment is being submitted independently against current main despite that overlap; do not incorporate the other PR's unmerged code, merge it, or resolve its conflicts. Keep this PR's changes surgical and mention the known overlap as context. Recheck current main; the earlier inventory of 21 synchronous and five asynchronous call sites is a guide, not an edit quota.

Stay within the allowlist. Report an insufficient allowlist or incompatible upstream changes rather than expanding the assignment.

Acceptance

Follow repository instructions, apply the narrow affected Spotless task, and validate through concrete Redisson javaagent consumers of the shared tests. Cover versions with and without database-index support and the relevant latest-dependency variant using existing build tasks. Preserve nullable expected types and assertion overload selection.

Open one draft PR against main describing this as a partial cleanup related to #19984, without an automatic closing reference. Report validation and environment blockers accurately. Do not merge or post review comments.

Co-authored-by: trask <218610+trask@users.noreply.github.com>
@opentelemetry-pr-dashboard

opentelemetry-pr-dashboard Bot commented Oct 9, 2026 •

Copy link
Copy Markdown

Pull request dashboard status

Waiting on reviewers · refreshed 2026-10-09 16:45 UTC

Review the latest changes.

Status above doesn't look right?
  • Just replied or pushed? Anything around or after the refresh time above may not be picked up yet — give it a few minutes.
  • Anything look wrong? Report it with what you expected; it helps us improve the dashboard.

Copilot AI changed the title [WIP] Implement Redisson namespace expected-value selection Inline Redisson namespace expectations in tests Oct 9, 2026
Copilot AI requested a review from trask October 9, 2026 16:06
@trask
trask requested a balanced review from Copilot October 9, 2026 16:22

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

The focused test refactor preserves existing values and capability hooks while following repository conventions.

0 open findings

What changed in this PR

Inlines Redisson database-index expectations in shared tests while preserving version-dependent behavior.

Changes:

  • Replaces namespace helper calls with explicit nullable ternaries.
  • Preserves configured database indexes and removes unused helpers.
File Description
AbstractRedissonClientTest.java Inlines synchronous namespace expectations.
AbstractRedissonAsyncClientTest.java Inlines asynchronous namespace expectations.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@trask
trask marked this pull request as ready for review October 9, 2026 16:25
@trask
trask requested a review from a team as a code owner October 9, 2026 16:25

This branch has not been deployed

No deployments
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.

3 participants