From 1efc6419853a395ed7317449bcb30e5c993c7198 Mon Sep 17 00:00:00 2001 From: Mike Cifelli Date: Wed, 5 Jun 2024 09:00:28 -0400 Subject: [PATCH] Fix tests --- test/chronoscope/gemini_test.exs | 10 +++++----- test/chronoscope/nts/key_establishment_client_test.exs | 2 +- test/chronoscope/nts_test.exs | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/test/chronoscope/gemini_test.exs b/test/chronoscope/gemini_test.exs index af0ac15..e508201 100644 --- a/test/chronoscope/gemini_test.exs +++ b/test/chronoscope/gemini_test.exs @@ -28,8 +28,8 @@ defmodule Chronoscope.GeminiTest do |> expect(:which_children, fn _ -> [{1, 2, 3, 4}, {5, 6, 7, 8}] end) GenServerMock - |> expect(:call, fn 2, :list -> :one end) - |> expect(:call, fn 6, :list -> :two end) + |> expect(:call, fn 2, :list, 10_000 -> :one end) + |> expect(:call, fn 6, :list, 10_000 -> :two end) assert Gemini.list() == [:one, :two] end @@ -48,7 +48,7 @@ defmodule Chronoscope.GeminiTest do |> expect(:lookup, fn _, _ -> [{1, 2}] end) GenServerMock - |> expect(:call, fn 1, :terminate -> :terminating end) + |> expect(:call, fn 1, :terminate, 10_000 -> :terminating end) assert Gemini.remove("localhost", 1965, "/") == {:ok, :terminating} end @@ -73,7 +73,7 @@ defmodule Chronoscope.GeminiTest do ) GenServerMock - |> expect(:call, fn 1, :connect -> :result end) + |> expect(:call, fn 1, :connect, 10_000 -> :result end) assert Gemini.connect("localhost", 1965, "/") == :result end @@ -83,7 +83,7 @@ defmodule Chronoscope.GeminiTest do |> expect(:lookup, fn _, _ -> [{1, 2}] end) GenServerMock - |> expect(:call, fn 1, :connect -> :result end) + |> expect(:call, fn 1, :connect, 10_000 -> :result end) assert Gemini.connect("localhost", 1965, "/") == :result end diff --git a/test/chronoscope/nts/key_establishment_client_test.exs b/test/chronoscope/nts/key_establishment_client_test.exs index 4a5758f..ae9b64c 100644 --- a/test/chronoscope/nts/key_establishment_client_test.exs +++ b/test/chronoscope/nts/key_establishment_client_test.exs @@ -10,7 +10,7 @@ defmodule Chronoscope.NTS.KeyEstablishmentClientTest do setup :verify_on_exit! - @timeout 3000 + @timeout 3500 describe "Chronoscope.NTS.KeyEstablishmentClient.key_establishment()" do test "sends the correct TLS options" do diff --git a/test/chronoscope/nts_test.exs b/test/chronoscope/nts_test.exs index a5bb6aa..8924b64 100644 --- a/test/chronoscope/nts_test.exs +++ b/test/chronoscope/nts_test.exs @@ -60,8 +60,8 @@ defmodule Chronoscope.NTSTest do ) GenServerMock - |> expect(:call, fn 1, :list -> :one end) - |> expect(:call, fn 2, :list -> :two end) + |> expect(:call, fn 1, :list, 10_000 -> :one end) + |> expect(:call, fn 2, :list, 10_000 -> :two end) assert NTS.list_clients([%{host: "test", port: 1}, %{host: "test2", port: 2}]) == [:one, :two] end @@ -80,7 +80,7 @@ defmodule Chronoscope.NTSTest do |> expect(:lookup, fn _, _ -> [{1, 2}] end) GenServerMock - |> expect(:call, fn 1, :terminate -> :terminating end) + |> expect(:call, fn 1, :terminate, 10_000 -> :terminating end) assert NTS.remove("localhost", 1111) == {:ok, :terminating} end