From f3b8ec95db3527da79be785578f50519c4e220ec Mon Sep 17 00:00:00 2001 From: Peter Thomas Date: Sun, 18 Apr 2021 22:24:01 +0530 Subject: [PATCH] add more tests for the graal troubles #1558 --- .../java/com/intuit/karate/core/parallel/karate-config.js | 2 +- .../intuit/karate/core/parallel/parallel-outline-1.feature | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/karate-core/src/test/java/com/intuit/karate/core/parallel/karate-config.js b/karate-core/src/test/java/com/intuit/karate/core/parallel/karate-config.js index e144cf40b..0c6e637e7 100644 --- a/karate-core/src/test/java/com/intuit/karate/core/parallel/karate-config.js +++ b/karate-core/src/test/java/com/intuit/karate/core/parallel/karate-config.js @@ -5,7 +5,7 @@ function fn() { }; var result = karate.callSingle('call-single-from-config.feature', config); config.message = result.response.message; - // this will throw the [Multi threaded access requested by thread xxx but is not allowed for language(s) js.] error + // this used to throw the [Multi threaded access requested by thread xxx but is not allowed for language(s) js.] error config.Hello = result.Hello; var result2 = karate.callSingle('call-single-from-config2.feature', result); config.message2 = result2.message; diff --git a/karate-core/src/test/java/com/intuit/karate/core/parallel/parallel-outline-1.feature b/karate-core/src/test/java/com/intuit/karate/core/parallel/parallel-outline-1.feature index bf5d9f244..b3e34105f 100644 --- a/karate-core/src/test/java/com/intuit/karate/core/parallel/parallel-outline-1.feature +++ b/karate-core/src/test/java/com/intuit/karate/core/parallel/parallel-outline-1.feature @@ -5,6 +5,8 @@ Background: # background http builder should work even for a dynamic scenario outline * url serverUrl * def data = [ { name: 'value1' }, { name: 'value2' }, { name: 'value3' }, { name: 'value4' } ] + # java object that comes from a callSingle in the config + * def helloClass = Hello Scenario Outline: * match functionFromKarateBase() == 'fromKarateBase' @@ -12,6 +14,9 @@ Scenario Outline: * method get * status 200 * match response == { message: 'from feature' } + # use java object from background, callSingle, config + * match helloClass.sayHello('from the other side') == 'hello from the other side' + * match helloClass.sayHello(name) == 'hello ' + name Examples: | data |