Skip to content

Commit

Permalink
Merge pull request #1844 from joelpramos/issue-1835
Browse files Browse the repository at this point in the history
fixing issue #1835
  • Loading branch information
ptrthomas authored Nov 20, 2021
2 parents 0e8b810 + eebb2b3 commit 7a8a288
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2050,9 +2050,12 @@ public Variable call(boolean callOnce, String exp, boolean sharedScope) {
}
Variable resultVariables = this.getCallFeatureVariables(result);
if (sharedScope) {
//setVariables(result.getValue());
if (resultVariables.isMap()) {
setVariables(resultVariables.getValue());
} else if (resultVariables.isList()) {
((List) resultVariables.getValue()).forEach(r -> {
setVariables((Map) r);
});
}
if (result.getValue() instanceof FeatureResult) {
setConfig(((FeatureResult) result.getValue()).getConfig());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,10 @@ Background:
* url 'http://localhost:' + karate.properties['server.port']

Scenario: reproducing #1835
# https://github.com/karatelabs/karate/issues/1835#issuecomment-969471445
* call read('parallel-outline-call-api.feature') [{'key':'value'}, {'key':'value2'}]
* def headers = response.headers
* call read('parallel-outline-call-api.feature')
* def headers = response.headers
* def r = call read('parallel-outline-call-api.feature')
* def headers = r.response.headers

0 comments on commit 7a8a288

Please sign in to comment.