Skip to content

Commit

Permalink
Fix failing unit tests.
Browse files Browse the repository at this point in the history
Signed-off-by: Rishikesh1159 <[email protected]>
  • Loading branch information
Rishikesh1159 committed Mar 22, 2023
1 parent 5065732 commit 7b3e333
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
public class SegmentReplicationDefaultIT extends OpenSearchIntegTestCase {

protected static final String INDEX_NAME = "test-idx-1";
protected static final String SYSTEM_INDEX_NAME = ".test-cluster-info-system-index";
protected static final String SYSTEM_INDEX_NAME = ".test-system-index";
protected static final int SHARD_COUNT = 1;
protected static final int REPLICA_COUNT = 1;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ public void validate(final Boolean value, final Map<Setting<?>, Object> settings
+ INDEX_REPLICATION_TYPE_SETTING.getKey()
+ " should be set to "
+ ReplicationType.SEGMENT
+ "or "
+ " or "
+ DEFAULT_REPLICATION_TYPE_SETTING_SEGMENT.getKey()
+ " should be set to "
+ Boolean.TRUE
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -869,7 +869,10 @@ public void testEnablingRemoteStoreFailsWhenReplicationTypeIsDocument() {
IllegalArgumentException.class,
() -> IndexMetadata.INDEX_REMOTE_STORE_ENABLED_SETTING.get(indexSettings)
);
assertEquals("To enable index.remote_store.enabled, index.replication.type should be set to SEGMENT", iae.getMessage());
assertEquals(
"To enable index.remote_store.enabled, index.replication.type should be set to SEGMENT or opensearch.index.default.replication.type.segment should be set to true",
iae.getMessage()
);
}

public void testEnablingRemoteStoreFailsWhenReplicationTypeIsDefault() {
Expand All @@ -878,7 +881,10 @@ public void testEnablingRemoteStoreFailsWhenReplicationTypeIsDefault() {
IllegalArgumentException.class,
() -> IndexMetadata.INDEX_REMOTE_STORE_ENABLED_SETTING.get(indexSettings)
);
assertEquals("To enable index.remote_store.enabled, index.replication.type should be set to SEGMENT", iae.getMessage());
assertEquals(
"To enable index.remote_store.enabled, index.replication.type should be set to SEGMENT or opensearch.index.default.replication.type.segment should be set to true",
iae.getMessage()
);
}

public void testRemoteRepositoryDefaultSetting() {
Expand Down

0 comments on commit 7b3e333

Please sign in to comment.