Skip to content

Instantly share code, notes, and snippets.

View oliveigah's full-sized avatar

Gabriel Oliveira oliveigah

  • Stone Payments
  • São José dos Campos - São Paulo, Brazil
  • X @oliveigah
View GitHub Profile
test "get pool status with raise before checkin", %{finch_name: finch_name} do
stub(Mint.HTTP, :request, fn _, _, _, _, _ ->
raise "unexpected error"
end)
start_supervised!(
{Finch,
name: finch_name,
pools: %{
default: [
@oliveigah
oliveigah / finch_test.exs
Created March 13, 2024 22:55
finch metrics test with idle connections
test "get pool status with not reusable connections", %{bypass: bypass, finch_name: finch_name} do
start_supervised!(
{Finch,
name: finch_name,
pools: %{
default: [
protocols: [:http1],
start_pool_metrics?: true,
conn_max_idle_time: 1,
size: 10