<commit_before>defmodule HELM.Entity.Controller.EntityServiceTest do

  use ExUnit.Case, async: true

  alias HELF.Broker

  @moduletag :umbrella

  setup do
    email = Burette.Internet.email()
    password = <PASSWORD>.Internet.password()
    params = %{email: email, password_confirmation: password, password: password}
    {:ok, params: params}
  end

  describe "entity creation" do
    test "after account creation", %{params: params} do
      {_, {:ok, account}} = Broker.call("account:create", params)
      assert params.email === account.email

      # FIXME
      :timer.sleep(100)

      {_, {:ok, entity}} = Broker.call("entity:find", account.account_id)
      assert "account" === entity.entity_type
    end
  end
end<commit_msg>Remove sleep from entity test, it's not needed since `account:create` already awaits for entity creation.<commit_after>defmodule HELM.Entity.Controller.EntityServiceTest do

  use ExUnit.Case, async: true

  alias HELF.Broker

  @moduletag :umbrella

  setup do
    email = Burette.Internet.email()
    password = <PASSWORD>()
    params = %{email: email, password_confirmation: password, password: password}
    {:ok, params: params}
  end

  describe "entity creation" do
    test "after account creation", %{params: params} do
      {_, {:ok, account}} = Broker.call("account:create", params)
      assert params.email === account.email

      {_, {:ok, entity}} = Broker.call("entity:find", account.account_id)
      assert "account" === entity.entity_type
    end
  end
end
{'fraction_non_alphanumeric': 0.12294543063773833, 'fraction_numerical': 0.0019723865877712033, 'mean_word_length': 3.683076923076923, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6641266', 'n_tokens_mistral': 484, 'n_tokens_neox': 451, 'n_words': 127}