SIGN IN SIGN UP

Fix #1492 by using `awaitStarted()` to preserve the order if invocations (#1494)

The problem is that using `awaitStarted()` on `attach`'s callback on a non-running container leads to the infinite wait for Jersey transport implementation.

This happens when `SelectiveLoggingFilter` is used in `DefaultInvocationBuilder` where it is created with `printEntity = true` parameter. In this case the implementation of `ClientResponseFilter.filter(...)` method in the base `LoggingFilter` class blocks at `responseContext.hasEntity()` until the data is available in the response. This happens because `hasEntity()` reads a single byte to check whether there is any data available in the stream. In the case of `attach` command this method blocks until there is data in stdout/stderr streams. Having data from the streams requires container running, which we cannot do safely without `awaitStarted()` because `attach` command is performed in a separate thread and we need to run `start` only _after_ `attach` request is executed not to loose the data from stdout/stderr streams.
A
Alexander Koshevoy committed
0d08a33dbbd39a2cc0046e7eddba1f5814eb2c88
Parent: ce5e9eb
Committed by GitHub <noreply@github.com> on 11/16/2020, 2:31:45 PM