I have proxy settings for our testing, e.g.,
function() {
var config = { // base config JSON
sslConfig: true,
apiUrl: 'https://my-api.com',
api2Url: 'https://my-api2.com',
proxy:
{
uri: 'http://my-proxy.com:3128',
nonProxyHosts:
[
'my-api2.com',
]
}
};
karate.configure('connectTimeout', 10001);
karate.configure('readTimeout', 10000);
karate.configure('proxy', config.proxy);
return config;
}
And it works fine in 0.9.2, after upgrade to 0.9.3, I get parsing error message below and process hanging there
13:47:45.639 | [ForkJoinPool-1-worker-1] | ERROR
failed function body: function() {
var config = { // base config JSON
sslConfig: true,
apiUrl: 'https://my-api.com',
api2Url: 'https://my-api2.com',
proxy:
{
uri: 'http://my-proxy.com:3128',
nonProxyHosts:
[
'my-api2.com',
]
}
};
karate.configure('connectTimeout', 10001);
karate.configure('readTimeout', 10000);
karate.configure('proxy', config.proxy);
return config;
}
13:47:45.646 | [ForkJoinPool-1-worker-1] | ERROR
evaluation of 'karate-config.js' failed: javascript function call failed: net.minidev.json.JSONArray cannot be cast to jdk.nashorn.api.scripting.ScriptObjectMirror
And I try to remove the key nonProxyHosts
, it works again. Can anyone suggest the solution for this issue?