Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

358
Visualizações
karate.org.apache.http.conn.HttpHostConnectException: Connection timed out: Http call failed after 21407 milliseconds

I see the below error when I run my script to retrieve token data using Karate framework -

karate.org.apache.http.conn.HttpHostConnectException: Connection timed out: connect, http call failed after 21407 milliseconds.

Below is the Gherkin syntax written to extract token data -

* configure charset = null
* configure cookies = null
* header Content-Type = 'application/json'
* header Cookie = 'SMSESSION=' + SMSESSION
* header Connection = 'keep-alive'
Given path 'main-controller/v1/tokens'
When request ''
And method POST
And karate.waitForHttp(url)
Then status 200
And def token = response
And print 'NEW GENERATED TOKEN = ' + token

- Please be informed that url and SMSESSSION have been defined already in Background.

I have already tried the below configuration settings -

* configure proxy = 'http://my.proxy.host:8080'
* configure ssl = true

But none of these configurations resolved my issue.

I have even used karate.waitForHttp(url) in my feature file to try and wait for the Token API to respond back. Karate reports show that it waits for 72987 ms but still ends up with the same error again.

Can somebody help me resolve this issue? Thanks in advance!

about 4 years ago · Santiago Gelvez
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda