Execution of karate tests starts with ~2 minutes delay

Viewed 437

After switching to Karate v. 1.0.1 I bumped into a weird issue. I use a standalone JAR. The issue is a big delay (almost 2 minutes) when I start running my tests. This delay didn't occur with previous versions. I use vscode extension (https://marketplace.visualstudio.com/items?itemName=kirkslota.karate-runner in v. 1.0.1) to run my tests. When I click on Karate Run I see this log in a terminal: > Executing task: java -cp 'karate.jar:karate:karate/*:karate/JARs/*:.' com.intuit.karate.Main "/path to a test/" < and then the delay happens before the actual execution of a test (or a batch of tests) starts. Karate Debug fails with an error Abborting debugger. Timed out waiting for debug server to start , which I guess is related to the delay. A command line I set in Karate Runner › Karate Jar: Command Line Args I is java -cp 'karate.jar:karate:karate/*:karate/JARs/*:.' com.intuit.karate.Main. In the end, karate tests run without additional issues. It is all about that big delay and the debugger failing with timeout.

Things I tried, but they didn't solve the issue: Karate v 1.0.1 with java 1.8, 11, 15; previous Karate version with java 11 (my previous setup which didn't have the problem); older Karate versions with java 1.8, 11, 15; older versions of Karate Runner extension.

I use: Visual Studio Code v. 1.56.2, macOS Big Sur v. 11.3.1, openjdk version "15.0.2" 2021-01-19, OpenJDK Runtime Environment (build 15.0.2+7), OpenJDK 64-Bit Server VM (build 15.0.2+7, mixed mode, sharing).

1 Answers

Do you see the same problem if you run tests on the command-line without VS Code ?

If you don't then it may be some issue with the karate-runner plugin, and you can file an issue here: https://github.com/kirksl/karate-runner

And also try creating a fresh project folder so that you create the VS Code settings from scratch.

If you don't see a problem with the VS Code part of things, then I hope it is related to this issue: https://github.com/intuit/karate/issues/1544 which is because you may have some nested feature calls in for e.g. the karate-config.js.

So the best thing you can do is:

a) build from source and verify that it solves your issue https://github.com/intuit/karate/wiki/Developer-Guide

b) if the above does not work, then you HAVE to follow this process: https://github.com/intuit/karate/wiki/How-to-Submit-an-Issue - because otherwise there is no way we can understand what's happening, and you may need to remain on old versions

Related