Skip to content

Commit 1bcdbc2

Browse files
committed
Assert it's removed too
1 parent f305122 commit 1bcdbc2

File tree

1 file changed

+11
-6
lines changed

1 file changed

+11
-6
lines changed

x-pack/plugin/searchable-snapshots/src/internalClusterTest/java/org/elasticsearch/xpack/searchablesnapshots/AllocationFilteringIntegTests.java

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -147,16 +147,21 @@ private void runTest(
147147
assertThat(restoreSnapshotResponse.getRestoreInfo().failedShards(), equalTo(0));
148148
ensureGreen(mountRequest.mountedIndexName());
149149

150+
final Settings mountedIndexSettings = client().admin()
151+
.indices()
152+
.prepareGetSettings(mountRequest.mountedIndexName())
153+
.get()
154+
.getIndexToSettings()
155+
.get(mountRequest.mountedIndexName());
156+
150157
if (mountSetting != null) {
151-
final Settings mountedIndexSettings = client().admin()
152-
.indices()
153-
.prepareGetSettings(mountRequest.mountedIndexName())
154-
.get()
155-
.getIndexToSettings()
156-
.get(mountRequest.mountedIndexName());
157158
assertTrue(mountedIndexSettings.toString(), mountSetting.getConcreteSettingForNamespace("_name").exists(mountedIndexSettings));
158159
}
159160

161+
if (indexSetting != mountSetting) {
162+
assertFalse(mountedIndexSettings.toString(), indexSetting.getConcreteSettingForNamespace("_name").exists(mountedIndexSettings));
163+
}
164+
160165
assertAcked(
161166
client().admin()
162167
.cluster()

0 commit comments

Comments
 (0)