Skip to content

Commit efcfa1b

Browse files
committed
Fix snapshot/restore tests: ignore_unavailable removed
1 parent 6811958 commit efcfa1b

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

src/Tests/Nest.Tests.Integration/Core/Repository/CreateRepositoryTests.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,6 @@ public void CreateAndDeleteRepository_ThenSnapshotWithoutWait()
8080
var backupName = ElasticsearchConfiguration.NewUniqueIndexName();
8181
var snapshotResponse = this.Client.Snapshot(repositoryName, backupName, selector: f => f
8282
.Index(ElasticsearchConfiguration.NewUniqueIndexName())
83-
.IgnoreUnavailable()
8483
.Partial());
8584
snapshotResponse.IsValid.Should().BeTrue();
8685
snapshotResponse.Accepted.Should().BeTrue();

src/Tests/Nest.Tests.Integration/Core/Repository/RestoreTests.cs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public void Setup()
4646

4747
var bulkResponse = this.Client.Bulk(d => descriptor);
4848

49-
this.Client.CreateRepository(_repositoryName, r => r
49+
var result = this.Client.CreateRepository(_repositoryName, r => r
5050
.FileSystem(@"local\\path", o => o
5151
.Compress()
5252
.ConcurrentStreams(10)));
@@ -80,7 +80,7 @@ public void SnapshotRestore()
8080
.RenamePattern(d + "_(.+)")
8181
.RenameReplacement(d + "_restored_$1")
8282
.Index(_indexName)
83-
.IgnoreUnavailable(true));
83+
);
8484

8585
_restoredIndexName = _indexName.Replace(d + "_", d + "_restored_");
8686
restoreResponse.IsValid.Should().BeTrue();
@@ -109,7 +109,6 @@ public void SnapshotRestore_IndexSettings()
109109
var snapshotResponse = this.Client.Snapshot(_repositoryName, _snapshotName, selector: f => f
110110
.Index(_indexName)
111111
.WaitForCompletion(true)
112-
.IgnoreUnavailable()
113112
.Partial());
114113
snapshotResponse.IsValid.Should().BeTrue();
115114

@@ -119,9 +118,9 @@ public void SnapshotRestore_IndexSettings()
119118
.RenamePattern(d + "_(.+)")
120119
.RenameReplacement(d + "_restored_$1")
121120
.Index(_indexName)
122-
.IgnoreUnavailable(true)
123121
.IndexSettings(descriptor => descriptor
124-
.RefreshInterval("123s"))
122+
.RefreshInterval("123s")
123+
)
125124
.IgnoreIndexSettings(UpdatableSettings.BlocksWrite));
126125

127126
restoreResponse.IsValid.Should().BeTrue();
@@ -200,7 +199,7 @@ public void SnapshotRestoreObservable()
200199
.RenamePattern(d + "_(.+)")
201200
.RenameReplacement(d + "_restored_$1")
202201
.Index(_indexName)
203-
.IgnoreUnavailable(true));
202+
);
204203

205204
bool restoreCompleted = false;
206205
var restoreObserver = new RestoreObserver(

0 commit comments

Comments
 (0)