pagarme / superbowleto

:football: A microservice to issue, register and manage boletos
MIT License
5 stars 0 forks source link

[BPROC-454] Change Timeout #377

Closed VictorSamp closed 2 years ago

VictorSamp commented 2 years ago

Descrição

Verificamos que atualmente a aplicação do Superbowleto tem um tempo de timeout configurado de 50 segundos na tentativa de emissão de boletos, esse tempo vem gerando um problema no Event Loop do Node, que fica sobrecarregado com várias requisições e afeta o transacional de boletos. Como método de corrigir e amenizar o problema, alteramos o tempo de timeout para 10 segundos, de forma a evitar a sobrecarga do Event Loop.

Testes

Foram criados testes unitários e de integração que cobrem as alterações realizadas nesse PR, além disso todos os demais testes continuaram passando corretamente.

image

Outro teste realizado foi do tempo de timeout utilizado, 10 segundos no caso. Configuramos o wiremock para segurar a requisição durante 30 segundos para conseguirmos simular o timeout da Boleto-api, dessa forma confirmamos que o tempo configurado está funcional.

Timeout ShopFácil pela BoletoApi

Após alterar o tempo de timeout do registro do ShopFácil para 10 segundos é possível ver que a aplicação atendeu corretamente o tempo configurado.

image

Timeout Caixa pela BoletoApi

O mesmo cenário anterior foi realizado, alteramos o tempo de timeout para 10 segundos.

image

Your checklist for this pull request

:rotating_light: Please review this items for a good pull request. :four_leaf_clover:

  1. I've read the project's Contributing Guidelines
  2. My commits are well written and follow pagarme/git-style-guide
  3. My changes are well covered by tests and logs
  4. I've updated the project docs (if needed)
  5. I fell safe about this implementation
  6. I feel comfortable with the code I wrote, and I'm not ashamed to show it to my friends

In a good pull request, everything above is true :relaxed:

GitCop commented 2 years ago

There were the following issues with your Pull Request

Check out our Git Style Guide here: https://github.com/pagarme/git-style-guide


This message was auto-generated by https://gitcop.com

GitCop commented 2 years ago

There were the following issues with your Pull Request

Check out our Git Style Guide here: https://github.com/pagarme/git-style-guide


This message was auto-generated by https://gitcop.com

GitCop commented 2 years ago

There were the following issues with your Pull Request

Check out our Git Style Guide here: https://github.com/pagarme/git-style-guide


This message was auto-generated by https://gitcop.com

GitCop commented 2 years ago

There were the following issues with your Pull Request

Check out our Git Style Guide here: https://github.com/pagarme/git-style-guide


This message was auto-generated by https://gitcop.com

GitCop commented 2 years ago

There were the following issues with your Pull Request

Check out our Git Style Guide here: https://github.com/pagarme/git-style-guide


This message was auto-generated by https://gitcop.com

GitCop commented 2 years ago

There were the following issues with your Pull Request

Check out our Git Style Guide here: https://github.com/pagarme/git-style-guide


This message was auto-generated by https://gitcop.com

GitCop commented 2 years ago

There were the following issues with your Pull Request

Check out our Git Style Guide here: https://github.com/pagarme/git-style-guide


This message was auto-generated by https://gitcop.com

GitCop commented 2 years ago

There were the following issues with your Pull Request

Check out our Git Style Guide here: https://github.com/pagarme/git-style-guide


This message was auto-generated by https://gitcop.com