[TEST] Set proper version on InputStream
This commit is contained in:
parent
7868373069
commit
7e08753bd2
|
@ -142,8 +142,8 @@ public class ClusterSerializationTests extends ESAllocationTestCase {
|
||||||
outStream.setVersion(Version.CURRENT.minimumIndexCompatibilityVersion());
|
outStream.setVersion(Version.CURRENT.minimumIndexCompatibilityVersion());
|
||||||
diffs.writeTo(outStream);
|
diffs.writeTo(outStream);
|
||||||
inStream = outStream.bytes().streamInput();
|
inStream = outStream.bytes().streamInput();
|
||||||
inStream.setVersion(outStream.getVersion());
|
|
||||||
inStream = new NamedWriteableAwareStreamInput(inStream, new NamedWriteableRegistry(ClusterModule.getNamedWriteables()));
|
inStream = new NamedWriteableAwareStreamInput(inStream, new NamedWriteableRegistry(ClusterModule.getNamedWriteables()));
|
||||||
|
inStream.setVersion(outStream.getVersion());
|
||||||
serializedDiffs = ClusterState.readDiffFrom(inStream, clusterState.nodes().getLocalNode());
|
serializedDiffs = ClusterState.readDiffFrom(inStream, clusterState.nodes().getLocalNode());
|
||||||
stateAfterDiffs = serializedDiffs.apply(ClusterState.EMPTY_STATE);
|
stateAfterDiffs = serializedDiffs.apply(ClusterState.EMPTY_STATE);
|
||||||
assertThat(stateAfterDiffs.custom(RestoreInProgress.TYPE), includeRestore ? notNullValue() : nullValue());
|
assertThat(stateAfterDiffs.custom(RestoreInProgress.TYPE), includeRestore ? notNullValue() : nullValue());
|
||||||
|
|
Loading…
Reference in New Issue