Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/google-maps/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Karate 0.9.3中使用Runner的场景大纲可能存在线程问题_Karate - Fatal编程技术网

Karate 0.9.3中使用Runner的场景大纲可能存在线程问题

Karate 0.9.3中使用Runner的场景大纲可能存在线程问题,karate,Karate,我注意到詹金斯的一份通宵工作在Junit report中失败了,但在Cucumber中没有。查看日志,我看到相同的调用进行了两次,一次因套接字异常超时而失败,另一次通过。 我们仍在使用Junit4 从Jenkins中的作业日志: 00:40:23.954 [ForkJoinPool-1-worker-5] DEBUG com.intuit.karate - request: 1 > GET https://qa.api.company.com/account/v1/accounts/123

我注意到詹金斯的一份通宵工作在Junit report中失败了,但在Cucumber中没有。查看日志,我看到相同的调用进行了两次,一次因套接字异常超时而失败,另一次通过。 我们仍在使用Junit4

从Jenkins中的作业日志:

00:40:23.954 [ForkJoinPool-1-worker-5] DEBUG com.intuit.karate - request:
1 > GET https://qa.api.company.com/account/v1/accounts/12345/obligations?pageNumber=1&pageSize=20000
1 > Accept-Encoding: gzip,deflate
1 > Connection: Keep-Alive
1 > Host: qa.api.company.com
1 > SourceApplicationName: integrationTest
1 > User-Agent: Apache-HttpClient/4.5.5 (Java/11.0.3)
1 > api-key: xxxx

00:40:26.012 [ForkJoinPool-1-worker-5] ERROR com.intuit.karate - java.net.SocketTimeoutException: Read timed out, http call failed after 2058 milliseconds for URL: https://qa.api.company.com/account/v1/accounts/12345/obligations?pageNumber=1&pageSize=20000
00:40:26.012 [ForkJoinPool-1-worker-5] ERROR com.intuit.karate - http request failed: 
java.net.SocketTimeoutException: Read timed out
从报告中可以看出:

00:46:08.259 request:
1 > GET https://qa.api.company.com/account/v1/accounts/12345/obligations?pageNumber=1&pageSize=20000
1 > Accept-Encoding: gzip,deflate
1 > Connection: Keep-Alive
1 > Host: qa.api.republicservices.com
1 > SourceApplicationName: integrationTest
1 > User-Agent: Apache-HttpClient/4.5.5 (Java/11.0.3)
1 > api-key: masked

00:46:09.144 response time in milliseconds: 107.94
1 < 200
跑步高手:

public class AccountsRunner extends IntegrationRunner {

    @Test
    public void accountsRunner() {
        Results results = Runner.parallel(getClass(), 5);
@KarateOptions(tags = {"~@ignore"}, features = "classpath:tests/")
public class IntegrationRunner {

    @Test
    public void integrationRunner() {
        Results results = Runner.parallel(getClass(), 5);

不确定是延伸跑步者导致了问题,还是空手道中的穿线问题,但是我不希望一个场景在多个池中运行。

这可能没问题,因为apache http客户端习惯于对失败的请求重新尝试最多3次。

这可能没问题,因为apache http客户端习惯于对失败的请求重新尝试最多3次。

我认为这是因为我们扩展了
IntegrationRunner
。我们唯一的跑步者似乎解决了这个问题。我认为这是因为我们扩展了
IntegrationRunner
的方式。作为我们唯一的跑步者,这样做似乎解决了问题。
@KarateOptions(tags = {"~@ignore"}, features = "classpath:tests/")
public class IntegrationRunner {

    @Test
    public void integrationRunner() {
        Results results = Runner.parallel(getClass(), 5);