Skip to content

Commit

Permalink
Assert specific value for thread.id
Browse files Browse the repository at this point in the history
  • Loading branch information
Cantido committed Mar 7, 2023
1 parent 889dcca commit 9b27f99
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test/otel_tests.exs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ defmodule OtelTests do
assert Map.get(attrs, :"code.function") |> String.starts_with?("test ")
assert Map.get(attrs, :"code.lineno") |> is_integer()
assert Map.get(attrs, :"code.namespace") == __MODULE__
assert Map.get(attrs, :"thread.id") |> is_integer()
assert Map.get(attrs, :"thread.id") == :erlang.system_info(:scheduler_id)
assert Map.get(attrs, "attr-1") == "value-1"
assert Map.get(attrs, "attr-2") == "value-2"
end
Expand Down Expand Up @@ -76,7 +76,7 @@ defmodule OtelTests do
assert Map.get(attrs, :"code.function") |> String.starts_with?("test ")
assert Map.get(attrs, :"code.lineno") |> is_integer()
assert Map.get(attrs, :"code.namespace") == __MODULE__
assert Map.get(attrs, :"thread.id") |> is_integer()
assert Map.get(attrs, :"thread.id") == :erlang.system_info(:scheduler_id)
assert Map.get(attrs, "attr-1") == "value-1"
assert Map.get(attrs, "attr-2") == "value-2"
end
Expand All @@ -98,7 +98,7 @@ defmodule OtelTests do
assert Map.get(attrs, :"code.function") |> String.starts_with?("test ")
assert Map.get(attrs, :"code.lineno") |> is_integer()
assert Map.get(attrs, :"code.namespace") == __MODULE__
assert Map.get(attrs, :"thread.id") |> is_integer()
assert Map.get(attrs, :"thread.id") == :erlang.system_info(:scheduler_id)
assert Map.get(attrs, "attr-1") == "value-1"
assert Map.get(attrs, "attr-2") == "value-2"
end
Expand Down Expand Up @@ -220,7 +220,7 @@ defmodule OtelTests do
assert Map.get(attrs, :"code.function") |> String.starts_with?("test ")
assert Map.get(attrs, :"code.lineno") |> is_integer()
assert Map.get(attrs, :"code.namespace") == __MODULE__
assert Map.get(attrs, :"thread.id") |> is_integer()
assert Map.get(attrs, :"thread.id") == :erlang.system_info(:scheduler_id)
assert Map.get(attrs, "attr-1") == "value-1"
assert Map.get(attrs, "attr-2") == "value-2"

Expand Down

0 comments on commit 9b27f99

Please sign in to comment.