Skip to content

Commit 6849bde

Browse files
committed
Downgrade xunit .NET core package version
to align with 5.x branch. Was receiving Unhandled Exception: System.MissingMethodException: Method not found: 'Void Xunit.TestDiscoverySink..ctor()'. when running unit tests with version specified. Bump FAKE version
1 parent 4f76fa2 commit 6849bde

File tree

10 files changed

+70
-22
lines changed

10 files changed

+70
-22
lines changed

build/scripts/Targets.fsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ Target "Version" <| fun _ ->
6262

6363
Target "Release" <| fun _ ->
6464
Release.NugetPack()
65-
Sign.ValidateNugetDllAreSignedCorrectly()
65+
Signing.Sign.ValidateNugetDllAreSignedCorrectly()
6666
Versioning.ValidateArtifacts()
6767

6868
Target "Canary" <| fun _ ->

docs/aggregations/writing-aggregations.asciidoc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,7 @@ return s => s
144144
);
145145
----
146146
<1> a list of aggregation functions to apply
147+
147148
<2> Using LINQ's `Aggregate()` function to accumulate/apply all of the aggregation functions
148149

149150
Combining multipe `AggregationDescriptor`'s is also possible using the bitwise `&` operator
@@ -211,5 +212,6 @@ var maxPerChild = childAggregation.Max("max_per_child");
211212
maxPerChild.Should().NotBeNull(); <2>
212213
----
213214
<1> Do something with the average per child. Here we just assert it's not null
215+
214216
<2> Do something with the max per child. Here we just assert it's not null
215217

docs/client-concepts/connection-pooling/request-overrides/disable-sniff-ping-per-request.asciidoc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,9 @@ new ClientCall()
6464
);
6565
----
6666
<1> disable sniffing
67+
6768
<2> first call is a successful ping
69+
6870
<3> sniff on startup call happens here, on the second call
6971

7072
Now, let's disable pinging on the request
@@ -87,6 +89,7 @@ audit = await audit.TraceCall(
8789
);
8890
----
8991
<1> disable ping
92+
9093
<2> No ping after sniffing
9194

9295
Finally, let's demonstrate disabling both sniff and ping on the request
@@ -108,5 +111,6 @@ audit = await audit.TraceCall(
108111
);
109112
----
110113
<1> diable ping and sniff
114+
111115
<2> no ping or sniff before the call
112116

docs/client-concepts/high-level/inference/field-inference.asciidoc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -521,9 +521,13 @@ class Precedence
521521
}
522522
----
523523
<1> Even though this property has a NEST property mapping _and_ a `JsonProperty` attribute, We are going to provide a hard rename for it on ConnectionSettings later that should win.
524+
524525
<2> This property has both a NEST attribute and a `JsonProperty`, NEST should win.
526+
525527
<3> We should take the json property into account by itself
528+
526529
<4> This property we are going to special case in our custom serializer to resolve to ask
530+
527531
<5> We are going to register a DefaultFieldNameInferrer on ConnectionSettings that will uppercase all properties.
528532

529533
Here we create a custom serializer that renames any property named `AskSerializer` to `ask`

docs/client-concepts/high-level/inference/indices-paths.asciidoc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,9 @@ ISearchRequest singleTypedRequest = new SearchDescriptor<Project>().Index(single
7979
var invalidSingleString = Nest.Indices.Index("name1, name2"); <3>
8080
----
8181
<1> specifying a single index using a string
82+
8283
<2> specifying a single index using a type
84+
8385
<3> an **invalid** single index name
8486

8587
==== Specifying multiple indices
@@ -111,7 +113,9 @@ manyStringRequest = new SearchDescriptor<Project>().Type(new[] { "name1", "name2
111113
((IUrlParameter)manyStringRequest.Type).GetString(client.ConnectionSettings).Should().Be("name1,name2");
112114
----
113115
<1> specifying multiple indices using strings
116+
114117
<2> specifying multiple indices using types
118+
115119
<3> The index names here come from the Connection Settings passed to `TestClient`. See the documentation on <<index-name-inference, Index Name Inference>> for more details.
116120

117121
==== Specifying All Indices

docs/client-concepts/high-level/mapping/auto-map.asciidoc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ var descriptor = new CreateIndexDescriptor("myindex")
8080
);
8181
----
8282
<1> map `Name` as a `string` type
83+
8384
<2> map `Employees` as an `object` type, mapping each of the properties of `Employee`
8485

8586
This is all fine and dandy and useful for some use cases however in most cases
@@ -1069,6 +1070,7 @@ public class DisableDocValuesPropertyVisitor : NoopPropertyVisitor
10691070
}
10701071
----
10711072
<1> Override the `Visit` method on `INumberProperty` and set `DocValues = false`
1073+
10721074
<2> Similarily, override the `Visit` method on `IBooleanProperty` and set `DocValues = false`
10731075

10741076
Now we can pass an instance of our custom visitor to `.AutoMap()`

docs/client-concepts/low-level/connecting.asciidoc

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,9 @@ var client = new ElasticLowLevelClient(config);
9191
var result = client.Search<SearchResponse<object>>(new { size = 12 });
9292
----
9393
<1> Disable automatic proxy detection. When called, defaults to `true`.
94+
9495
<2> Enable compressed request and responses from Elasticsearch (Note that nodes need to be configured to allow this. See the {ref_current}/modules-http.html[http module settings] for more info).
96+
9597
<3> By default responses are deserialized directly from the response stream to the object you tell it to. For debugging purposes, it can be very useful to keep a copy of the raw response on the result object, which is what calling this method will do.
9698

9799
`.ResponseBodyInBytes` will only have a value if the client configuration has `DisableDirectStreaming` set
@@ -129,9 +131,13 @@ config = config
129131
.BasicAuthentication("username", "password");
130132
----
131133
<1> Allows you to set querystring parameters that have to be added to every request. For instance, if you use a hosted elasticserch provider, and you need need to pass an `apiKey` parameter onto every request.
134+
132135
<2> Sets proxy information on the connection.
136+
133137
<3> [[request-timeout]] Sets the global maximum time a connection may take. Please note that this is the request timeout, the builtin .NET `WebRequest` has no way to set connection timeouts (see http://msdn.microsoft.com/en-us/library/system.net.httpwebrequest.timeout(v=vs.110).aspx[the MSDN documentation on `HttpWebRequest.Timeout` Property]).
138+
134139
<4> As an alternative to the C/go like error checking on `response.IsValid`, you can instead tell the client to <<thrown-exceptions, throw exceptions>>.
140+
135141
<5> forces all serialization to be indented and appends `pretty=true` to all the requests so that the responses are indented as well
136142

137143
NOTE: Basic authentication credentials can alternatively be specified on the node URI directly:
@@ -359,7 +365,9 @@ public class MyJsonNetSerializer : JsonNetSerializer
359365
}
360366
----
361367
<1> Call this constructor if you only need access to `JsonSerializerSettings` without local state
368+
362369
<2> Call OverwriteDefaultSerializers if you need access to `JsonSerializerSettings` with local state
370+
363371
<3> You can inject contract resolved converters by implementing the ContractConverters property. This can be much faster then registering them on `JsonSerializerSettings.Converters`
364372

365373
You can then register a factory on `ConnectionSettings` to create an instance of your subclass instead.

paket.lock

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,7 @@ NUGET
331331
System.Runtime (>= 4.3) - framework: >= netstandard13
332332
System.Runtime.Extensions (>= 4.3) - framework: >= netstandard13
333333
System.Runtime.InteropServices (>= 4.3) - framework: >= netstandard13
334-
System.IO (4.3) - framework: net46, >= net46, >= netstandard10, netstandard11, netstandard13, netstandard14
334+
System.IO (4.3) - framework: net46, >= net46, >= netstandard10, netstandard13, netstandard14
335335
Microsoft.NETCore.Platforms (>= 1.1) - framework: dnxcore50, netstandard10, netstandard13, >= netstandard15
336336
Microsoft.NETCore.Targets (>= 1.1) - framework: dnxcore50, netstandard10, netstandard13, >= netstandard15
337337
System.Runtime (>= 4.3) - framework: dnxcore50, netstandard10, netstandard13, >= netstandard15
@@ -398,15 +398,15 @@ NUGET
398398
System.Runtime (>= 4.3) - framework: dnxcore50, netstandard10, netstandard13, >= netstandard16
399399
System.Runtime.Extensions (>= 4.3) - framework: dnxcore50, >= netstandard16
400400
System.Threading (>= 4.3) - framework: dnxcore50, >= netstandard16
401-
System.Net.Http (4.3) - framework: >= netstandard11
401+
System.Net.Http (4.3.1) - framework: >= netstandard11
402402
Microsoft.NETCore.Platforms (>= 1.1) - framework: dnxcore50, netstandard13, >= netstandard16
403403
Microsoft.Win32.Primitives (>= 4.3) - framework: netstandard13
404404
runtime.native.System (>= 4.3) - framework: >= netstandard16
405405
runtime.native.System.Net.Http (>= 4.3) - framework: >= netstandard16
406406
runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3) - framework: >= netstandard16
407407
System.Collections (>= 4.3) - framework: dnxcore50, netstandard13, >= netstandard16
408408
System.Diagnostics.Debug (>= 4.3) - framework: dnxcore50, netstandard13, >= netstandard16
409-
System.Diagnostics.DiagnosticSource (>= 4.3) - framework: >= net46, dnxcore50, netstandard13, >= netstandard16
409+
System.Diagnostics.DiagnosticSource (>= 4.3) - framework: dnxcore50, netstandard13, >= netstandard16
410410
System.Diagnostics.Tracing (>= 4.3) - framework: dnxcore50, netstandard13, >= netstandard16
411411
System.Globalization (>= 4.3) - framework: dnxcore50, netstandard13, >= netstandard16
412412
System.Globalization.Extensions (>= 4.3) - framework: >= netstandard16
@@ -450,7 +450,7 @@ NUGET
450450
System.Reactive.Windows.Threading (>= 3.1.1) - framework: >= net45, winv4.5.1, wpav8.1
451451
System.Reactive.WindowsRuntime (>= 3.1.1) - framework: winv4.5.1, wpav8.1
452452
System.Reactive.Core (3.1.1) - framework: >= net45, >= netstandard10, winv4.5.1, wpav8.1
453-
System.Reactive.Interfaces (>= 3.1.1) - framework: >= net45, >= netstandard10, netcore10
453+
System.Reactive.Interfaces (>= 3.1.1) - framework: >= net45, >= netstandard10
454454
System.Reactive.Interfaces (3.1.1) - framework: >= net45, >= netstandard10
455455
System.Reactive.Linq (3.1.1)
456456
System.Reactive.Core (>= 3.1.1) - framework: >= net45, >= netstandard10
@@ -530,12 +530,12 @@ NUGET
530530
Microsoft.NETCore.Targets (>= 1.1) - framework: >= netstandard13
531531
System.Runtime (>= 4.3) - framework: >= netstandard13
532532
System.Runtime.InteropServices (4.3) - framework: net46, >= net46, >= netstandard11, netstandard13, netstandard14
533-
Microsoft.NETCore.Platforms (>= 1.1) - framework: dnxcore50, netstandard11, netstandard12, netstandard13, >= netstandard15, netcore11
534-
Microsoft.NETCore.Targets (>= 1.1) - framework: dnxcore50, netstandard11, netstandard12, netstandard13, >= netstandard15, netcore11
535-
System.Reflection (>= 4.3) - framework: dnxcore50, netstandard11, netstandard12, netstandard13, >= netstandard15, netcore11
536-
System.Reflection.Primitives (>= 4.3) - framework: dnxcore50, netstandard11, netstandard12, netstandard13, >= netstandard15, netcore11
537-
System.Runtime (>= 4.3) - framework: net462, >= net463, dnxcore50, netstandard11, netstandard12, netstandard13, >= netstandard15, netcore11
538-
System.Runtime.Handles (>= 4.3) - framework: dnxcore50, netstandard13, >= netstandard15, netcore11
533+
Microsoft.NETCore.Platforms (>= 1.1) - framework: dnxcore50, netstandard11, netstandard12, netstandard13, >= netstandard15
534+
Microsoft.NETCore.Targets (>= 1.1) - framework: dnxcore50, netstandard11, netstandard12, netstandard13, >= netstandard15
535+
System.Reflection (>= 4.3) - framework: dnxcore50, netstandard11, netstandard12, netstandard13, >= netstandard15
536+
System.Reflection.Primitives (>= 4.3) - framework: dnxcore50, netstandard11, netstandard12, netstandard13, >= netstandard15
537+
System.Runtime (>= 4.3) - framework: net462, >= net463, dnxcore50, netstandard11, netstandard12, netstandard13, >= netstandard15
538+
System.Runtime.Handles (>= 4.3) - framework: dnxcore50, netstandard13, >= netstandard15
539539
System.Runtime.InteropServices.RuntimeInformation (4.3) - framework: >= netstandard11
540540
runtime.native.System (>= 4.3) - framework: >= netstandard11
541541
System.Reflection (>= 4.3) - framework: dnxcore50, >= netstandard11
@@ -682,7 +682,7 @@ NUGET
682682
System.Collections (>= 4.3) - framework: dnxcore50, >= netstandard16
683683
System.Globalization (>= 4.3) - framework: dnxcore50, >= netstandard16
684684
System.Resources.ResourceManager (>= 4.3) - framework: dnxcore50, >= netstandard16
685-
System.Runtime (>= 4.3) - framework: dnxcore50, netstandard10, netstandard13, >= netstandard16, netcore11
685+
System.Runtime (>= 4.3) - framework: dnxcore50, netstandard10, netstandard13, >= netstandard16
686686
System.Runtime.Extensions (>= 4.3) - framework: dnxcore50, >= netstandard16
687687
System.Threading (>= 4.3) - framework: dnxcore50, >= netstandard16
688688
System.Threading (4.3) - framework: net46, >= net46, >= netstandard10, netstandard13, netstandard14
@@ -803,7 +803,7 @@ NUGET
803803
System.Dynamic.Runtime (>= 4.0.11) - framework: >= netstandard13
804804
System.Reflection.TypeExtensions (>= 4.1) - framework: >= netstandard13
805805
System.Runtime.Serialization.Primitives (>= 4.1.1) - framework: >= netstandard13
806-
FAKE (4.50)
806+
FAKE (4.57.4)
807807
FSharp.Data (2.3.2)
808808
Zlib.Portable (>= 1.11) - framework: >= netstandard11, portable-net45+sl5+win8, portable-net45+win8, portable-net45+win8+wp8+wpa81
809809
gitlink (2.4.1)

src/Tests/Cluster/TaskManagement/TasksList/TasksListApiTests.cs

Lines changed: 28 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
using System;
22
using System.Linq;
3+
using System.Threading;
34
using Elasticsearch.Net;
45
using FluentAssertions;
56
using Nest;
@@ -80,11 +81,33 @@ protected override void IntegrationSetup(IElasticClient client, CallUniqueValues
8081
var seeder = new DefaultSeeder(this.Cluster.Node);
8182
seeder.SeedNode();
8283

83-
// get a suitable load of projects in order to get a decent task status out
84-
var bulkResponse = client.IndexMany(Project.Generator.Generate(20000));
85-
if (!bulkResponse.IsValid)
86-
throw new Exception("failure in setting up integration");
87-
84+
var handle = new ManualResetEvent(false);
85+
86+
// get a suitable load of projects in order to get a decent task status out
87+
var observableBulk = client.BulkAll(Project.Generator.Generate(25000), f => f
88+
.MaxDegreeOfParallelism(8)
89+
.BackOffTime(TimeSpan.FromSeconds(4))
90+
.BackOffRetries(2)
91+
.Size(500)
92+
.RefreshOnCompleted()
93+
);
94+
95+
var bulkObserver = new BulkAllObserver(
96+
onError: (e) => { throw e; },
97+
onCompleted: () => handle.Set()
98+
);
99+
100+
observableBulk.Subscribe(bulkObserver);
101+
102+
try
103+
{
104+
handle.WaitOne(TimeSpan.FromMinutes(1));
105+
}
106+
catch (Exception e)
107+
{
108+
throw new Exception("failure in setting up integration", e);
109+
}
110+
88111
var response = client.ReindexOnServer(r => r
89112
.Source(s => s
90113
.Index(Infer.Index<Project>())

src/Tests/project.json

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,23 @@
33
"buildOptions": {
44
"emitEntryPoint": true,
55
"warningsAsErrors": false,
6+
"nowarn": [ "CS1591", "1591", "1573" ],
67
"embed": [
78
"Document\\Single\\Attachment\\Attachment_Test_Document.pdf"
89
]
910
},
1011
"dependencies": {
12+
"Bogus": "9.0.2",
1113
"BenchmarkDotNet": "0.10.0",
1214
"System.Buffers": "4.0.0",
1315
"Elasticsearch.Net": { "target": "project" },
1416
"Nest": { "target": "project" },
15-
"Bogus": "8.0.2",
1617
"DiffPlex": "2.0.0-alpha1",
17-
"FluentAssertions": "4.18.0",
18+
"FluentAssertions": "4.19",
1819
"Newtonsoft.Json": "9.0.1",
1920
"System.Reactive": "3.1.1",
20-
"xunit": "2.2.0-beta3-build3330",
21-
"dotnet-test-xunit": "2.2.0-preview3-build1032",
21+
"xunit": "2.2.0-beta2-build3300",
22+
"dotnet-test-xunit": "2.2.0-preview2-build1029",
2223
"SemanticVersioning": "0.7.6"
2324
},
2425
"configurations": {

0 commit comments

Comments
 (0)