151
151
import static org .opensearch .node .remotestore .RemoteStoreNodeAttribute .REMOTE_STORE_REPOSITORY_SETTINGS_ATTRIBUTE_KEY_PREFIX ;
152
152
import static org .opensearch .node .remotestore .RemoteStoreNodeAttribute .REMOTE_STORE_REPOSITORY_TYPE_ATTRIBUTE_KEY_FORMAT ;
153
153
import static org .opensearch .node .remotestore .RemoteStoreNodeAttribute .REMOTE_STORE_ROUTING_TABLE_REPOSITORY_NAME_ATTRIBUTE_KEY ;
154
+ import static org .opensearch .node .remotestore .RemoteStoreNodeAttribute .isRemoteRoutingTableEnabled ;
154
155
import static org .hamcrest .Matchers .anEmptyMap ;
155
156
import static org .hamcrest .Matchers .equalTo ;
156
157
import static org .hamcrest .Matchers .is ;
@@ -485,8 +486,8 @@ public void testWriteFullMetadataInParallelSuccess() throws IOException {
485
486
assertThat (manifest .getStateUUID (), is (expectedManifest .getStateUUID ()));
486
487
assertThat (manifest .getPreviousClusterUUID (), is (expectedManifest .getPreviousClusterUUID ()));
487
488
488
- assertEquals (7 , actionListenerArgumentCaptor .getAllValues ().size ());
489
- assertEquals (7 , writeContextArgumentCaptor .getAllValues ().size ());
489
+ assertEquals (8 , actionListenerArgumentCaptor .getAllValues ().size ());
490
+ assertEquals (8 , writeContextArgumentCaptor .getAllValues ().size ());
490
491
491
492
byte [] writtenBytes = capturedWriteContext .get ("metadata" )
492
493
.getStreamProvider (Integer .MAX_VALUE )
@@ -722,7 +723,7 @@ public void testWriteIncrementalMetadataSuccess() throws IOException {
722
723
eq (false ),
723
724
eq (Collections .emptyMap ()),
724
725
eq (false ),
725
- eq ( Collections . emptyList () ),
726
+ anyList ( ),
726
727
Mockito .any (StringKeyDiffProvider .class )
727
728
);
728
729
@@ -743,7 +744,7 @@ public void testWriteIncrementalMetadataSuccess() throws IOException {
743
744
assertThat (manifest .getTemplatesMetadata (), notNullValue ());
744
745
assertThat (manifest .getCoordinationMetadata (), notNullValue ());
745
746
assertThat (manifest .getCustomMetadataMap ().size (), is (2 ));
746
- assertThat (manifest .getIndicesRouting ().size (), is (0 ));
747
+ assertThat (manifest .getIndicesRouting ().size (), is (1 ));
747
748
}
748
749
749
750
public void testWriteIncrementalMetadataSuccessWhenPublicationEnabled () throws IOException {
@@ -2642,7 +2643,7 @@ public void testRemoteStateUploadStats() throws IOException {
2642
2643
}
2643
2644
2644
2645
public void testRemoteRoutingTableNotInitializedWhenDisabled () {
2645
- if (publicationEnabled ) {
2646
+ if (isRemoteRoutingTableEnabled ( settings ) ) {
2646
2647
assertTrue (remoteClusterStateService .getRemoteRoutingTableService () instanceof InternalRemoteRoutingTableService );
2647
2648
} else {
2648
2649
assertTrue (remoteClusterStateService .getRemoteRoutingTableService () instanceof NoopRemoteRoutingTableService );
0 commit comments