GeezerVison is showing github.com — [ggj][infra][2/5] feat: integrate java-diff-util library with dummy test by xiaozhenliu-gg5 · Pull Request #290 · googleapis/sdk-platform-java
This repository was archived by the owner on Oct 29, 2026. It is now read-only.
Conversation
Find more details in design doc: go/java-micro-file-diff-infra
- add diffUtils which use java-diff-utils to extract diff between two strings, or string with a file content.
- add assertUtils to trigger the comparison and emit the diff to test-logs.
- integrate the assertUtils with new dummy test.
Removed part of the expected code, and the test failure looks as below:
There was 1 failure:
1) simpleLineComment(com.google.api.generator.gapic.dummy.FileDiffInfraDummyTest)
junit.framework.AssertionFailedError: Differences found:
--- golden
+++ codegen
@@ -1,1 +1,1 @@
-// test strings.
+// test strings comparison.
There was 1 failure:
1) classWithHeader(com.google.api.generator.gapic.dummy.FileDiffInfraDummyTest)
junit.framework.AssertionFailedError: Differences found:
--- golden
+++ codegen
@@ -8,5 +8,5 @@
* https://www.apache.org/licenses/LICENSE-2.0
*
- * Unless applicable law or agreed to in writing, software
+ * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
The following step would be:
- Add bazel rules for updating golden files if the codegen is not identical with the existing goldens.
- Move the existing expected class string to file-diff infra.
- Update developer doc to include this instruction for updating goldens
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM with nits addressed.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Reviewers
2 more reviewers
Reviewers whose approvals may not affect merge requirements
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Labels
cla: yes
This human has signed the Contributor License Agreement.
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
|