Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/managed_ring.ex
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ defmodule HashRing.Managed do
id: opts[:id] || opts[:name],
type: :worker,
restart: :permanent,
start: {__MODULE__, :run, [opts[:name], Keyword.take(opts, @valid_ring_opts)]}
start: {__MODULE__, :new, [opts[:name], Keyword.take(opts, @valid_ring_opts)]}
},
Map.new(Keyword.drop(opts, @valid_ring_opts))
)
Expand Down
7 changes: 7 additions & 0 deletions test/hashring_managed_test.exs
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
defmodule HashRing.ManagedTest do
use ExUnit.Case, async: true
doctest HashRing.Managed

describe "child_spec" do
test "starts a ring", ctx do
name = String.to_atom("#{ctx.module}#{ctx.test}")
assert {:ok, _pid} = start_supervised({HashRing.Managed, [name: name]})
end
end
end