Skip to content

Commit

Permalink
test: update proto columns test (#2845)
Browse files Browse the repository at this point in the history
* test(spanner): add try-with-resources block to free up resources

* test(spanner): add test for to string

* test(spanner): fix tests
  • Loading branch information
harshachinta authored Jan 28, 2024
1 parent 2c0a34b commit 04f72ee
Show file tree
Hide file tree
Showing 6 changed files with 304 additions and 249 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1749,9 +1749,15 @@ com.google.protobuf.Value valueToProto() {
return com.google.protobuf.Value.newBuilder().setStringValue(base64EncodedString).build();
}

@Nonnull
@Override
public String getAsString() {
return value == null ? NULL_STRING : value.toBase64();
}

@Override
void valueToString(StringBuilder b) {
b.append(value.toString());
b.append(value.toBase64());
}
}

Expand Down Expand Up @@ -2387,7 +2393,7 @@ String elementToString(ByteArray element) {

@Override
void appendElement(StringBuilder b, ByteArray element) {
b.append(element.toString());
b.append(element.toBase64());
}
}

Expand Down
Loading

0 comments on commit 04f72ee

Please sign in to comment.