Pretty much following along with the guide for the genserver, though using a different type of map for the “buckets”. I keep getting this error here:
1) test spawns viewports (ViewportRegistryTest)
test/lib/viewport_registry_test.exs:10
** (EXIT from #PID<0.309.0>) an exception was raised:
** (ErlangError) erlang error: :timeout_value
(stdlib) gen_server.erl:389: :gen_server.loop/7
(stdlib) proc_lib.erl:247: :proc_lib.init_p_do_apply/3
The error doesn’t mean much to me since it doesn’t include anything but the test that is failing.
test/lib/viewport_registry_test.exs:10:
test "spawns viewports", %{registry: registry, hex: hex} do
assert ViewportRegistry.lookup(registry, "xibalba") == :error
ViewportRegistry.create(registry, "xibalba")
assert {:ok, viewport} = ViewportRegistry.lookup(registry, "xibalba")
Viewport.put(viewport, hex, 1)
assert Viewport.get(viewport, hex) == 1
end
The thing I find surprising though, is that if I enter in all the lines of the test individually in iex everything evaluates just fine, but it fails when I run mix test
.
Might there be cleanup I need to do?