I am trying to implement Karate Labs framework within an already existing TestNG setup. But executing the test causes the thread to go WAITING stat indefinitely. Can someone identify the issue here
@Test
public void testRestCases() {
try {
String mName = "testRestCases";
String path = staticPath + "apis.feature";
LOG.info(CLASSNAME, mName, "Rest cases test started");
Runner.path(path).parallel(1);
LOG.info(CLASSNAME, mName, "Rest cases executed successfully");
} catch (Exception e) {
LOG.info(CLASSNAME, TLog.EXCEP_MSG, e);
}
}
I tried debugging the code to no avail. Here is the thread dump
"pool-20-thread-1@12631" tid=0x96 nid=NA waiting
java.lang.Thread.State: WAITING
at jdk.internal.misc.Unsafe.park(Unsafe.java:-1)
at java.util.concurrent.locks.LockSupport.park(LockSupport.java:221)
at java.util.concurrent.CompletableFuture$Signaller.block(CompletableFuture.java:1864)
at java.util.concurrent.ForkJoinPool.unmanagedBlock(ForkJoinPool.java:4011)
at java.util.concurrent.ForkJoinPool.managedBlock(ForkJoinPool.java:3959)
at java.util.concurrent.CompletableFuture.waitingGet(CompletableFuture.java:1898)
at java.util.concurrent.CompletableFuture.join(CompletableFuture.java:2117)
at com.intuit.karate.Suite.run(Suite.java:247)
at com.intuit.karate.Runner$Builder.parallel(Runner.java:575)
at com.zoho.transmail.testng.rest.RestAPITestUnit.testRestCases(RestAPITestUnit.java:29)
at java.lang.invoke.LambdaForm$DMH/0x00001c0000194000.invokeVirtual(LambdaForm$DMH:-1)
at java.lang.invoke.LambdaForm$MH/0x00001c0000243400.invoke(LambdaForm$MH:-1)
at java.lang.invoke.Invokers$Holder.invokeExact_MT(Invokers$Holder:-1)
at jdk.internal.reflect.DirectMethodHandleAccessor.invokeImpl(DirectMethodHandleAccessor.java:153)
at jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
at java.lang.reflect.Method.invoke(Method.java:580)
at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:86)
at org.testng.internal.Invoker.invokeMethod(Invoker.java:643)
at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:820)
at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1128)
at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:129)
at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:112)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
at java.lang.Thread.runWith(Thread.java:1583)
at java.lang.Thread.run(Thread.java:1570)
New contributor
Shiva G is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.