Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in test with Elixir 1.17.x/Erlang OTP 27.x #46

Open
kianmeng opened this issue Aug 18, 2024 · 0 comments
Open

Error in test with Elixir 1.17.x/Erlang OTP 27.x #46

kianmeng opened this issue Aug 18, 2024 · 0 comments

Comments

@kianmeng
Copy link
Contributor

ENVs:

elixir          1.17.2-otp-27   /home/foobar/.tool-versions
erlang          27.0.1          /home/foobar/.tool-versions

Steps to reproduce:

git clone https://github.com/stueccles/analytics-elixir
cd analytics-elixir
mix deps.get
mix deps.update --all
mix test

Results:

Running ExUnit with seed: 584276, max_cases: 24
Excluding tags: [:test]
Including tags: [location: {"test/segment_test.exs", 4}]


00:13:53.660 [info] The function passed as a handler with ID #PID<0.198.0> is a local function.
This means that it is either an anonymous function or a capture of a function without a module specified. That may cause a performance penalty when calling that handler. For more details see the note in `telemetry:attach/4` documentation.

https://hexdocs.pm/telemetry/telemetry.html#attach/4

00:13:57.880 [error] [Segment] Batch call of 6 events failed after 3 retries. :nxdomain


  1) test track debugging (SegmentTest)
     test/segment_test.exs:4
     Assertion failed, no matching message after 0ms
     The following variables were pinned:
       events = [%Segment.Analytics.Track{anonymousId: nil, context: %Segment.Analytics.Context{active: nil, app: nil, campaign: nil, device: nil, ip: nil, library: %{name: "analytics_elixir", version: "0.2.7"}, locale: nil, location: nil, network: nil, os: nil, page: nil, referrer: nil, screen: nil, timezone: nil, groupId: nil, traits: nil, userAgent: nil}, integrations: nil, timestamp: nil, userId: "user1", version: nil, event: "track debugging 671464", properties: %{}, type: "track"}, %Segment.Analytics.Identify{anonymousId: nil, context: %Segment.Analytics.Context{active: nil, app: nil, campaign: nil, device: nil, ip: nil, library: %{name: "analytics_elixir", version: "0.2.7"}, locale: nil, location: nil, network: nil, os: nil, page: nil, referrer: nil, screen: nil, timezone: nil, groupId: nil, traits: nil, userAgent: nil}, integrations: nil, timestamp: nil, userId: "user1", version: nil, traits: %{debug: "identify debugging 124546"}, type: "identify"}, %Segment.Analytics.Screen{anonymousId: nil, context: %Segment.Analytics.Context{active: nil, app: nil, campaign: nil, device: nil, ip: nil, library: %{name: "analytics_elixir", version: "0.2.7"}, locale: nil, location: nil, network: nil, os: nil, page: nil, referrer: nil, screen: nil, timezone: nil, groupId: nil, traits: nil, userAgent: nil}, integrations: nil, timestamp: nil, userId: "user1", version: nil, name: "screen debugging 306016", properties: %{}, type: "screen"}, %Segment.Analytics.Alias{anonymousId: nil, context: %Segment.Analytics.Context{active: nil, app: nil, campaign: nil, device: nil, ip: nil, library: %{name: "analytics_elixir", version: "0.2.7"}, locale: nil, location: nil, network: nil, os: nil, page: nil, referrer: nil, screen: nil, timezone: nil, groupId: nil, traits: nil, userAgent: nil}, integrations: nil, timestamp: nil, userId: "user1", version: nil, previousId: "user2", type: "alias"}, %Segment.Analytics.Group{anonymousId: nil, context: %Segment.Analytics.Context{active: nil, app: nil, campaign: nil, device: nil, ip: nil, library: %{name: "analytics_elixir", version: "0.2.7"}, locale: nil, location: nil, network: nil, os: nil, page: nil, referrer: nil, screen: nil, timezone: nil, groupId: nil, traits: nil, userAgent: nil}, integrations: nil, timestamp: nil, userId: "user1", version: nil, groupId: "group1", traits: %{debug: "group debugging 986552"}, type: "group"}, %Segment.Analytics.Page{anonymousId: nil, context: %Segment.Analytics.Context{active: nil, app: nil, campaign: nil, device: nil, ip: nil, library: %{name: "analytics_elixir", version: "0.2.7"}, locale: nil, location: nil, network: nil, os: nil, page: nil, referrer: nil, screen: nil, timezone: nil, groupId: nil, traits: nil, userAgent: nil}, integrations: nil, timestamp: nil, userId: "user1", version: nil, name: "page debugging 351980", properties: %{}, type: "page"}]
     Showing 1 of 1 message in the mailbox
     code: assert_received {:telemetry, [:segment, :batch, :stop], %{duration: duration},
            %{events: ^events, status: :ok, result: {:ok, env}}}
     mailbox:
       pattern: {:telemetry, [:segment, :batch, :stop], %{duration: duration},
                 %{events: ^events, status: :ok, result: {:ok, env}}}
       value:   {:telemetry, [:segment, :batch, :stop], %{monotonic_time: -576460747174711966, duration: 2528654770},
                 %{
                   error: {:error, :nxdomain},
                   status: :error,
                   events: [
                     %Segment.Analytics.Track{
                       anonymousId: nil,
                       context: %Segment.Analytics.Context{
                         active: nil,
                         app: nil,
                         campaign: nil,
                         device: nil,
                         ip: nil,
                         library: %{name: "analytics_elixir", version: "0.2.7"},
                         locale: nil,
                         location: nil,
                         network: nil,
                         os: nil,
                         page: nil,
                         referrer: nil,
                         screen: nil,
                         timezone: nil,
                         groupId: nil,
                         traits: nil,
                         userAgent: nil
                       },
                       integrations: nil,
                       timestamp: nil,
                       userId: "user1",
                       version: nil,
                       event: "track debugging 671464",
                       properties: %{},
                       type: "track"
                     },
                     %Segment.Analytics.Identify{
                       anonymousId: nil,
                       context: %Segment.Analytics.Context{
                         active: nil,
                         app: nil,
                         campaign: nil,
                         device: nil,
                         ip: nil,
                         library: %{name: "analytics_elixir", version: "0.2.7"},
                         locale: nil,
                         location: nil,
                         network: nil,
                         os: nil,
                         page: nil,
                         referrer: nil,
                         screen: nil,
                         timezone: nil,
                         groupId: nil,
                         traits: nil,
                         userAgent: nil
                       },
                       integrations: nil,
                       timestamp: nil,
                       userId: "user1",
                       version: nil,
                       traits: %{debug: "identify debugging 124546"},
                       type: "identify"
                     },
                     %Segment.Analytics.Screen{
                       anonymousId: nil,
                       context: %Segment.Analytics.Context{
                         active: nil,
                         app: nil,
                         campaign: nil,
                         device: nil,
                         ip: nil,
                         library: %{name: "analytics_elixir", version: "0.2.7"},
                         locale: nil,
                         location: nil,
                         network: nil,
                         os: nil,
                         page: nil,
                         referrer: nil,
                         screen: nil,
                         timezone: nil,
                         groupId: nil,
                         traits: nil,
                         userAgent: nil
                       },
                       integrations: nil,
                       timestamp: nil,
                       userId: "user1",
                       version: nil,
                       name: "screen debugging 306016",
                       properties: %{},
                       type: "screen"
                     },
                     %Segment.Analytics.Alias{
                       anonymousId: nil,
                       context: %Segment.Analytics.Context{
                         active: nil,
                         app: nil,
                         campaign: nil,
                         device: nil,
                         ip: nil,
                         library: %{name: "analytics_elixir", version: "0.2.7"},
                         locale: nil,
                         location: nil,
                         network: nil,
                         os: nil,
                         page: nil,
                         referrer: nil,
                         screen: nil,
                         timezone: nil,
                         groupId: nil,
                         traits: nil,
                         userAgent: nil
                       },
                       integrations: nil,
                       timestamp: nil,
                       userId: "user1",
                       version: nil,
                       previousId: "user2",
                       type: "alias"
                     },
                     %Segment.Analytics.Group{
                       anonymousId: nil,
                       context: %Segment.Analytics.Context{
                         active: nil,
                         app: nil,
                         campaign: nil,
                         device: nil,
                         ip: nil,
                         library: %{name: "analytics_elixir", version: "0.2.7"},
                         locale: nil,
                         location: nil,
                         network: nil,
                         os: nil,
                         page: nil,
                         referrer: nil,
                         screen: nil,
                         timezone: nil,
                         groupId: nil,
                         traits: nil,
                         userAgent: nil
                       },
                       integrations: nil,
                       timestamp: nil,
                       userId: "user1",
                       version: nil,
                       groupId: "group1",
                       traits: %{debug: "group debugging 986552"},
                       type: "group"
                     },
                     %Segment.Analytics.Page{
                       anonymousId: nil,
                       context: %Segment.Analytics.Context{
                         active: nil,
                         app: nil,
                         campaign: nil,
                         device: nil,
                         ip: nil,
                         library: %{name: "analytics_elixir", version: "0.2.7"},
                         locale: nil,
                         location: nil,
                         network: nil,
                         os: nil,
                         page: nil,
                         referrer: nil,
                         screen: nil,
                         timezone: nil,
                         groupId: nil,
                         traits: nil,
                         userAgent: nil
                       },
                       integrations: nil,
                       timestamp: nil,
                       userId: "user1",
                       version: nil,
                       name: "page debugging 351980",
                       properties: %{},
                       type: "page"
                     }
                   ],
                   result: {:error, :nxdomain},
                   telemetry_span_context: #Reference<0.1592853307.3768057863.200386>
                 }}
     stacktrace:
       test/segment_test.exs:49: (test)


Finished in 4.2 seconds (0.00s async, 4.2s sync)
1 test, 1 failure
@mhsdef mhsdef mentioned this issue Dec 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant