X Tutup
Skip to content

Jersey and HttpClient5 implementations do not guarantees consecutive requests execution to Docker daemon #1492

@tejksat

Description

@tejksat

Several get(...) and post(...) methods of com.github.dockerjava.core.DefaultInvocationBuilder class (where com.github.dockerjava.api.async.ResultCallback argument is passed) call executeAndStream(...) method. This method starts the separate thread which actually performs HTTP request. This method does not wait until the thread is started. This leads to the race condition where several consequent requests could be mixed up in the timeline.

F.e. in com.github.dockerjava.cmd.AttachContainerCmdIT.attachContainerWithTTY() test there are two commands that is performed consequently: "attach to container" and "start container". Sometimes HTTP requests are performed in the reverse order (start and then attach). This results in the lost data from stdout and stderr streams of the container process and leads to the test failure.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      X Tutup