Skip to content

Commit

Permalink
Force portable TestStream to use NesteCoder context throughout.
Browse files Browse the repository at this point in the history
  • Loading branch information
lostluck committed Dec 9, 2024
1 parent 2344fdc commit f2b88e9
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ static <T> RunnerApi.TestStreamPayload.Event eventToProto(
.setTimestamp(element.getTimestamp().getMillis())
.setEncodedElement(
ByteString.copyFrom(
CoderUtils.encodeToByteArray(coder, element.getValue()))));
CoderUtils.encodeToByteArray(coder, element.getValue(), Coder.Context.NESTED))));
}
return RunnerApi.TestStreamPayload.Event.newBuilder().setElementEvent(builder).build();
default:
Expand All @@ -149,7 +149,7 @@ static <T> TestStream.Event<T> eventFromProto(
protoEvent.getElementEvent().getElementsList()) {
decodedElements.add(
TimestampedValue.of(
CoderUtils.decodeFromByteArray(coder, element.getEncodedElement().toByteArray()),
CoderUtils.decodeFromByteArray(coder, element.getEncodedElement().toByteArray(), Coder.Context.NESTED),
new Instant(element.getTimestamp())));
}
return TestStream.ElementEvent.add(decodedElements);
Expand Down

0 comments on commit f2b88e9

Please sign in to comment.