Skip to content

Commit 5391fd0

Browse files
committed
fix failing update/deleteby query tests not explicitly stating query
1 parent f01a9da commit 5391fd0

File tree

6 files changed

+7
-6
lines changed

6 files changed

+7
-6
lines changed

src/Tests/Document/Multiple/DeleteByQuery/DeleteByQueryApiTests.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,11 +110,13 @@ public DeleteByQueryWaitForCompletionApiTests(IntrusiveOperationCluster cluster,
110110

111111
protected override Func<DeleteByQueryDescriptor<Project>, IDeleteByQueryRequest> Fluent => d => d
112112
.Index(this.CallIsolatedValue)
113+
.Query(q=>q.MatchAll())
113114
.WaitForCompletion(false)
114115
.Conflicts(Conflicts.Proceed);
115116

116117
protected override DeleteByQueryRequest Initializer => new DeleteByQueryRequest(this.CallIsolatedValue, Type<Project>())
117118
{
119+
Query = new MatchAllQuery(),
118120
WaitForCompletion = false,
119121
Conflicts = Conflicts.Proceed
120122
};

src/Tests/Document/Multiple/ReindexOnServer/ReindexOnServerInvalidApiTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ protected override void ExpectResponse(IReindexOnServerResponse response)
3030
response.ServerError.Status.Should().Be(500);
3131
response.ServerError.Error.Should().NotBeNull();
3232
response.ServerError.Error.RootCause.Should().NotBeNullOrEmpty();
33-
response.ServerError.Error.RootCause.First().Reason.Should().Contain("Error compiling");
33+
response.ServerError.Error.RootCause.First().Reason.Should().Contain("compil");
3434
response.ServerError.Error.RootCause.First().Type.Should().Be("script_exception");
3535
}
3636

src/Tests/Document/Multiple/ReindexRethrottle/ReindexRethrottleApiTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ protected override void OnBeforeCall(IElasticClient client)
4949
var reindex = client.UpdateByQuery<Project>(u => u
5050
.Conflicts(Conflicts.Proceed)
5151
.Query(q => q.MatchAll())
52-
.Script(s => s.Inline("ctx._source.numberOfCommits+10").Lang("groovy"))
52+
.Script(s => s.Inline("ctx._source.numberOfCommits+10"))
5353
.Refresh()
5454
.RequestsPerSecond(1)
5555
.WaitForCompletion(false)

src/Tests/Document/Multiple/UpdateByQuery/UpdateByQueryApiTests.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,18 +28,16 @@ protected override void IntegrationSetup(IElasticClient client, CallUniqueValues
2828
{
2929
foreach (var index in values.Values)
3030
{
31-
#pragma warning disable 618
3231
this.Client.CreateIndex(index, c => c
3332
.Mappings(m => m
3433
.Map<Test>(map => map
3534
.Dynamic(false)
3635
.Properties(props => props
37-
.String(s => s.Name(p => p.Text))
36+
.Text(s => s.Name(p => p.Text))
3837
)
3938
)
4039
)
4140
);
42-
#pragma warning restore 618
4341
this.Client.Index(new Test { Text = "words words", Flag = "bar" }, i => i.Index(index).Refresh(Refresh.True));
4442
this.Client.Index(new Test { Text = "words words", Flag = "foo" }, i => i.Index(index).Refresh(Refresh.True));
4543
this.Client.Map<Test>(m => m

src/Tests/Modules/Scripting/ScriptingCrudTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ protected override LazyResponses Create() => Calls<PutScriptDescriptor, PutScrip
2121
requestAsync: (s, c, r) => c.PutScriptAsync(r)
2222
);
2323

24-
private string _lang = "groovy";
24+
private string _lang = "painless";
2525

2626
protected PutScriptRequest CreateInitializer(string id) => new PutScriptRequest(_lang, id) { Script = "1+1" };
2727
protected IPutScriptRequest CreateFluent(string id, PutScriptDescriptor d) => d.Script("1+1");

src/Tests/Search/Request/InnerHitsUsageTests.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ public void Seed()
5656
.Settings(s => s
5757
.NumberOfReplicas(0)
5858
.NumberOfShards(1)
59+
.Setting("mapping.single_type", "false")
5960
)
6061
.Mappings(map => map
6162
.Map<King>(m => m.AutoMap()

0 commit comments

Comments
 (0)