Repository navigation
Fix #518, #522 - #586
Fix #518, #522#586
Conversation
|
I'll take a look into the broken tests. |
|
I wouldn't change the behavior of HttpClient on this release. This is very problematic given the way everything else works. On the new/refactored code, We would use |
…stic), await containerLogsTask at the end of the GetContainerLogs_* tests
Disposing the client will not change the behavior, it is just cleaner if someone disposes
|
|
Are any adjustments necessary? |
|
@HofmeisterAn is there any other way to check if the DockerClient timeout is being considered on each call? I couldn't come out with any alternative |
|
@dgvives what do you mean by "any other way"? Looking into the |
|
@HofmeisterAn the default timeout is used to create a CancellationToken for the http request. https://github.com/dotnet/Docker.DotNet/blob/master/src/Docker.DotNet/DockerClient.cs#L370-L378 if (timeout != SInfiniteTimeout)
{
using (var timeoutTokenSource = CancellationTokenSource.CreateLinkedTokenSource(cancellationToken))
{
timeoutTokenSource.CancelAfter(timeout);
return await _client.SendAsync(request, completionOption, timeoutTokenSource.Token)
.ConfigureAwait(false);
}
}The test to verify that the request is cancelled after the specified timeout was done using a non-streamed call to DockerClient, in this case |
|
Ah now I get it, you reffering to: Somewhere I had an example that behaves (partially) like an HTTP Docker endpoint (I used it to do some load tests). Maybe we can use this, to enable the test again. I will take a look into it (share it) in the next days. Have some nice holidays. |
@galvesribeiro The first commit disposes the
HttpClient. Usually, you would like to keep a single instance of theHttpClientfor the entire application. I am not certain if that works with the current implementation. That's why I kept it as a non static field, disposing it makes sense then.The second one removes the extra properties. I double-checked them against the API docs.
pullandoutputswhere part of e43cdd9 and detected by my script (as I said, I didn't really check the other way around).Closes #518, closes #522.