[karatelabs/karate] Karate framework : Multi threaded access requested by thread Thread[nioEventLoopGroup-2-1,10,main] but is not allowed for language(s) js thrown when I use handle for the websocket #2410
socket.send(req)
The following error is given Multi threaded access requested by thread Thread[nioEventLoopGroup-2-1,10,main] but is not allowed for language(s) js
I tried to use warp the handle as follow but the error still persist
In my case I have the use the handle to return the desired response body and I tried to create a custom java method for the handler but it doesnt work it is giving the following error
Please help if you can , I have the following test
Feature: websocket test operation
@websocket_test Scenario Outline: testing websockets
demoBaseUrl is a wss address and is defined in the config file
I noticed that when i use the handle within my scenario I get as follow
I tried to use warp the handle as follow but the error still persist
However when I dont include the handle like the following, the same error is not thrown
In my case I have the use the handle to return the desired response body and I tried to create a custom java method for the handler but it doesnt work it is giving the following error
Below is my test Background:
demoBaseUrl is a wss address and is defined in the config file
* def socket = karate.webSocket(demoBaseUrl)
Below is is my java_handle() method in java
package javaUtilities;
public class javaKarate { public static Boolean java_handle(String msg){ return (msg.startsWith("{") && !msg.contains("context"));
}
I'm not sure what else I should do, not sure if there is an alternative the handle . Please help