Skip to content

Commit

Permalink
Fix compatibility marshallable test
Browse files Browse the repository at this point in the history
  • Loading branch information
alamar committed Feb 27, 2023
1 parent f19ee89 commit 3a9e523
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
1 change: 1 addition & 0 deletions src/main/java/net/openhft/chronicle/wire/YamlWire.java
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,7 @@ protected void initReadContext() {
if (readContext == null)
useBinaryDocuments();
readContext.start();
yt.reset();
}

@NotNull
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,12 @@ public ForwardAndBackwardCompatibilityMarshallableTest(WireType wireType) {
this.wireType = wireType;
}

@Parameterized.Parameters
@Parameterized.Parameters(name = "{0}")
public static Collection<Object[]> data() {
return Arrays.asList(new Object[][]{
{WireType.JSON},
{WireType.TEXT},
{WireType.YAML},
{WireType.BINARY}
});
}
Expand All @@ -58,9 +59,6 @@ public void marshableStringBuilderTest() throws Exception {
wire.writeDocument(false, w -> new MDTO2(1, 2, "3").writeMarshallable(w));
// System.out.println(Wires.fromSizePrefixedBlobs(wire));

if (wire instanceof TextWire)
((TextWire) wire).useBinaryDocuments();

try (DocumentContext dc = wire.readingDocument()) {
if (!dc.isPresent())
Assert.fail();
Expand Down

0 comments on commit 3a9e523

Please sign in to comment.