Set dependency to Response when multi in pipeline and build dependency
first if Response's dependency found and not built * there's some dependency with exec response and command responses within multi * if command responses's get() called before exec response's build(), it calls exec response's build() first * unit test included
This commit is contained in:
@@ -31,6 +31,12 @@ public class Pipeline extends MultiKeyPipelineBase {
|
||||
return values;
|
||||
}
|
||||
|
||||
public void setResponseDependency(Response<?> dependency) {
|
||||
for (Response<?> response : responses) {
|
||||
response.setDependency(dependency);
|
||||
}
|
||||
}
|
||||
|
||||
public void addResponse(Response<?> response) {
|
||||
responses.add(response);
|
||||
}
|
||||
@@ -106,6 +112,7 @@ public class Pipeline extends MultiKeyPipelineBase {
|
||||
public Response<List<Object>> exec() {
|
||||
client.exec();
|
||||
Response<List<Object>> response = super.getResponse(currentMulti);
|
||||
currentMulti.setResponseDependency(response);
|
||||
currentMulti = null;
|
||||
return response;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user