Skip to content

Commit a042c11

Browse files
committed
update tests
1 parent 4210e60 commit a042c11

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

tests/Elastic.Transport.Tests/Configuration/TransportConfigurationTests.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ public void CopiesAllDefaults()
1919
config.Should().BeEquivalentTo(newConfig);
2020
}
2121

22+
#if !NETFRAMEWORK
2223
[Fact]
2324
public void CopiesAllProperties()
2425
{
@@ -33,4 +34,5 @@ public void CopiesAllProperties()
3334

3435
config.Should().BeEquivalentTo(newConfig);
3536
}
37+
#endif
3638
}

tests/Elastic.Transport.Tests/ResponseBuilderDisposeTests.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -67,18 +67,18 @@ private async Task AssertResponse<T>(bool disableDirectStreaming, int statusCode
6767

6868
var memoryStreamFactory = new TrackMemoryStreamFactory();
6969

70-
if (skipStatusCode > -1 )
70+
if (skipStatusCode > -1)
7171
config = InMemoryConnectionFactory.Create(productRegistration)
7272
.DisableDirectStreaming(disableDirectStreaming)
73-
.SkipDeserializationForStatusCodes(skipStatusCode)
74-
.MemoryStreamFactory(memoryStreamFactory);
73+
.SkipDeserializationForStatusCodes(skipStatusCode);
7574
else if (productRegistration is not null)
7675
config = InMemoryConnectionFactory.Create(productRegistration)
77-
.DisableDirectStreaming(disableDirectStreaming)
78-
.MemoryStreamFactory(memoryStreamFactory);
76+
.DisableDirectStreaming(disableDirectStreaming);
7977
else
8078
config = disableDirectStreaming ? _settingsDisableDirectStream : _settings;
8179

80+
config = new TransportConfiguration(config) { MemoryStreamFactory = memoryStreamFactory };
81+
8282
var endpoint = new Endpoint(new EndpointPath(httpMethod, "/"), new Node(new Uri("http://localhost:9200")));
8383
var requestData = new RequestData(config, null, customResponseBuilder);
8484

0 commit comments

Comments
 (0)