You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 571a013
Browse filesBrowse the repository at this point in the historyBrowse files
fix(bigtable): delegate MaterializedView/LogicalView toString() to proto and fix list*ViewsTest (#15243)
`MaterializedView.equals()` and `LogicalView.equals()` delegate to
protobuf message equality, which compares every field including
server-populated read-only metadata and `UnknownFieldSet` entries.
When `ListMaterializedViews` or `ListLogicalViews` populates read-only
metadata fields that are not populated in the `CreateMaterializedView` /
`CreateLogicalView` LRO response, `assertThat(response).contains(view)`
fails even when the view is returned with the expected ID,
deletion-protection setting, and query.
- Delegate `MaterializedView#toString()` and `LogicalView#toString()` to
`proto.toString()` (with unit tests in `MaterializedViewTest` and
`LogicalViewTest`) so failure messages print readable protobuf contents
instead of default `Object#toString()` identity hashes.
- Update `BigtableMaterializedViewIT#listMaterializedViewsTest` and
`BigtableLogicalViewIT#listLogicalViewsTest` to compare elements via
Truth `Correspondence` (`comparingElementsUsing(...)`) on `getId()`,
`isDeletionProtected()`, and `getQuery()`.
Copy file name to clipboardExpand all lines: java-bigtable/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/models/LogicalView.java
+5Lines changed: 5 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -105,4 +105,9 @@ public boolean equals(Object o) {
Copy file name to clipboardExpand all lines: java-bigtable/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/models/MaterializedView.java
+5Lines changed: 5 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -108,4 +108,9 @@ public boolean equals(Object o) {
Copy file name to clipboardExpand all lines: java-bigtable/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/it/BigtableLogicalViewIT.java
Copy file name to clipboardExpand all lines: java-bigtable/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/it/BigtableMaterializedViewIT.java
Copy file name to clipboardExpand all lines: java-bigtable/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/models/LogicalViewTest.java
Copy file name to clipboardExpand all lines: java-bigtable/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/models/MaterializedViewTest.java
0 commit comments