diff --git a/lib/archethic/utils/regression/playbook.ex b/lib/archethic/utils/regression/playbook.ex index b26d61a2c..a46d74f0d 100644 --- a/lib/archethic/utils/regression/playbook.ex +++ b/lib/archethic/utils/regression/playbook.ex @@ -318,7 +318,7 @@ defmodule Archethic.Utils.Regression.Playbook do ) receive do - %{"transactionConfirmed" => %{"nbConfirmations" => 1}} -> + %{"transactionConfirmed" => %{"nbConfirmations" => n}} when n > 0 -> :ok %{"transactionError" => %{"reason" => reason}} -> @@ -326,6 +326,9 @@ defmodule Archethic.Utils.Regression.Playbook do {:error, reason} -> {:error, reason} + + unknown_msg -> + Logger.warn("await_replication received an unknown message: #{inspect(unknown_msg)}") end end diff --git a/lib/archethic/utils/websocket/handler.ex b/lib/archethic/utils/websocket/handler.ex index a6dc7e071..edf82fdc7 100644 --- a/lib/archethic/utils/websocket/handler.ex +++ b/lib/archethic/utils/websocket/handler.ex @@ -17,8 +17,9 @@ defmodule Archethic.Utils.WebSocket.SocketHandler do name = Keyword.get(opts, :ws_name, __MODULE__) host = Keyword.get(opts, :host, "localhost") port = Keyword.get(opts, :port, "4000") + protocol = Keyword.get(opts, :protocol, "ws") - ws_url = "ws://#{host}:#{port}/socket/websocket" + ws_url = "#{protocol}://#{host}:#{port}/socket/websocket" state = %{ subscriptions: %{},