I'm getting an error (karate version: '1.1.0.RC2') when reusing java function
Java method
package utils;
public class Util {
public static String getDateFromToday(int addDaysFromToday) {
return LocalDate.now().plusDays(addDaysFromToday).toString();
}
}
Scenario:
Scenario: The scenario that I reused
* def util = Java.type('utils.Util')
* def start = util.getDateFromToday(10)
When I'm using more than 1 thread I'm getting the following error for random tests during the suite execution:
* def start = util.getDateFromToday(10)
>>>> js failed:
01: util.getDateFromToday(10)
<<<<
org.graalvm.polyglot.PolyglotException: TypeError: invokeMember (getDateFromToday) on utils.Util failed due to: Unknown identifier: getDateFromToday
- <js>.:program(Unnamed:1)
If I only use 1 thread everything works fine