@@ -386,9 +386,9 @@ public void testMigrationFromCodecV0ManifestToCodecV1Manifest() throws IOExcepti
386
386
Metadata newMetadata = Metadata .builder (previousClusterState .metadata ()).put (indexMetadata , true ).build ();
387
387
ClusterState newClusterState = ClusterState .builder (previousClusterState ).metadata (newMetadata ).build ();
388
388
389
- // previous manifest with codec 1 and null global metadata
389
+ // previous manifest with codec 0 and null global metadata
390
390
final ClusterMetadataManifest previousManifest = ClusterMetadataManifest .builder ()
391
- .codecVersion (1 )
391
+ .codecVersion (ClusterMetadataManifest . CODEC_V0 )
392
392
.globalMetadataFileName (null )
393
393
.indices (Collections .emptyList ())
394
394
.build ();
@@ -402,8 +402,8 @@ public void testMigrationFromCodecV0ManifestToCodecV1Manifest() throws IOExcepti
402
402
403
403
// global metadata is updated
404
404
assertThat (manifestAfterUpdate .getGlobalMetadataFileName (), notNullValue ());
405
- // Manifest file with codec version with 2 is updated.
406
- assertThat (manifestAfterUpdate .getCodecVersion (), is (2 ));
405
+ // Manifest file with codec version with 1 is updated.
406
+ assertThat (manifestAfterUpdate .getCodecVersion (), is (ClusterMetadataManifest . CODEC_V1 ));
407
407
}
408
408
409
409
public void testWriteIncrementalGlobalMetadataSuccess () throws IOException {
@@ -626,8 +626,7 @@ public void testReadLatestMetadataManifestSuccessButNoIndexMetadata() throws IOE
626
626
.nodeId ("nodeA" )
627
627
.opensearchVersion (VersionUtils .randomOpenSearchVersion (random ()))
628
628
.previousClusterUUID ("prev-cluster-uuid" )
629
- .globalMetadataFileName ("global-metadata-file" )
630
- .codecVersion (1 )
629
+ .codecVersion (ClusterMetadataManifest .CODEC_V0 )
631
630
.build ();
632
631
633
632
BlobContainer blobContainer = mockBlobStoreObjects ();
@@ -684,8 +683,7 @@ public void testReadLatestMetadataManifestSuccess() throws IOException {
684
683
.clusterUUID ("cluster-uuid" )
685
684
.nodeId ("nodeA" )
686
685
.opensearchVersion (VersionUtils .randomOpenSearchVersion (random ()))
687
- .globalMetadataFileName ("global-metadata" )
688
- .codecVersion (1 )
686
+ .codecVersion (ClusterMetadataManifest .CODEC_V0 )
689
687
.previousClusterUUID ("prev-cluster-uuid" )
690
688
.build ();
691
689
@@ -732,8 +730,7 @@ public void testReadLatestIndexMetadataSuccess() throws IOException {
732
730
.nodeId ("nodeA" )
733
731
.opensearchVersion (VersionUtils .randomOpenSearchVersion (random ()))
734
732
.previousClusterUUID ("prev-cluster-uuid" )
735
- .globalMetadataFileName ("global-metadata" )
736
- .codecVersion (1 )
733
+ .codecVersion (ClusterMetadataManifest .CODEC_V0 )
737
734
.build ();
738
735
739
736
mockBlobContainer (mockBlobStoreObjects (), expectedManifest , Map .of (index .getUUID (), indexMetadata ));
0 commit comments