Skip to content

Commit

Permalink
chore: remove automatic sql variable extraction
Browse files Browse the repository at this point in the history
one must explicitly call `extract` using column- plut target-variable-names
in order to extract data from the result into the current `TestContext`.

BREAKING CHANGE: sql queries no longer automatically extract variables
  • Loading branch information
bbortt committed Sep 18, 2023
1 parent 45b6935 commit 9ad9105
Show file tree
Hide file tree
Showing 2 changed files with 86 additions and 199 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -123,12 +123,6 @@ public void doExecute(TestContext context) {

// fill the request test context variables (extract tag)
fillContextVariables(columnValuesMap, context);

// legacy: save all columns as variables TODO: remove in major version upgrade
for (Entry<String, List<String>> column : columnValuesMap.entrySet()) {
List<String> columnValues = column.getValue();
context.setVariable(column.getKey().toUpperCase(), columnValues.get(0) == null ? NULL_VALUE : columnValues.get(0));
}
} catch (DataAccessException e) {
logger.error("Failed to execute SQL statement", e);
throw new CitrusRuntimeException(e);
Expand Down
Loading

0 comments on commit 9ad9105

Please sign in to comment.