From c71fc75bdd3bf75ac6d99514c298a4093c12ec99 Mon Sep 17 00:00:00 2001 From: Derek Kraan Date: Mon, 12 Feb 2024 12:09:28 +0100 Subject: [PATCH] Add base-case test for `which_children/1` --- test/dynamic_supervisor_test.exs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/dynamic_supervisor_test.exs b/test/dynamic_supervisor_test.exs index 39a254c..dcbeff9 100644 --- a/test/dynamic_supervisor_test.exs +++ b/test/dynamic_supervisor_test.exs @@ -285,6 +285,10 @@ defmodule DynamicSupervisorTest do end describe ".which_children/1" do + test "is empty", context do + assert [] = Horde.DynamicSupervisor.which_children(context.horde_1) + end + test "collects results from all horde nodes", context do Horde.DynamicSupervisor.start_child(context.horde_1, %{context.task_def | id: :proc_1}) Horde.DynamicSupervisor.start_child(context.horde_1, %{context.task_def | id: :proc_2})