Skip to content

Review fixes for couchbase-common-2.0:javaagent-unit-tests#18118

Merged
trask merged 2 commits into
mainfrom
otelbot/code-review-couchbase-common-2.0-javaagent-unit-tests
Apr 22, 2026
Merged

Review fixes for couchbase-common-2.0:javaagent-unit-tests#18118
trask merged 2 commits into
mainfrom
otelbot/code-review-couchbase-common-2.0-javaagent-unit-tests

Conversation

@otelbot
Copy link
Copy Markdown
Contributor

@otelbot otelbot Bot commented Apr 21, 2026

Summary

Applied one safe [Testing] fix in couchbase-common-2.0 javaagent-unit-tests: removed a redundant preliminary AssertJ null check so the test keeps a single direct assertion on the normalized query value.

Applied Changes

[Testing]

File: CouchbaseQuerySanitizerTest.java:27
Change: Removed the redundant assertThat(normalized).isNotNull() before the normalized-query equality assertion in testShouldNormalizeStringQuery(...).
Reason: Repository test guidance prefers direct AssertJ assertions without unnecessary extra assertion noise; the following equality assertion already fails clearly if normalized is null or unexpected.


Download code review diagnostics

Automated code review of instrumentation/couchbase/couchbase-common-2.0/javaagent-unit-tests.
@otelbot otelbot Bot requested a review from a team as a code owner April 21, 2026 18:45
@MethodSource("providesArguments")
void testShouldNormalizeStringQuery(Parameter parameter) {
String normalized = CouchbaseQuerySanitizer.analyze(parameter.query).getQueryText();
assertThat(normalized).isNotNull();
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@trask trask merged commit aebdbc7 into main Apr 22, 2026
94 checks passed
@trask trask deleted the otelbot/code-review-couchbase-common-2.0-javaagent-unit-tests branch April 22, 2026 22:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants