Skip to content

Frontend telemetry tests failing with timer/timeout issues #311

@Mosas2000

Description

@Mosas2000

Problem

Multiple telemetry-related tests are failing due to timer handling issues.

Affected Tests

telemetry-sink.test.js

  • automatically flushes when batch size reached - Infinite loop error (10000 timers)
  • retries on failure - Test timeout (10000ms)
  • gives up after max retries - Test timeout (10000ms)

telemetry-integration.test.js

  • Page view count assertion: expected 0 but received 1

telemetry-vitals.test.js

  • returns unknown for undefined vital - expected 'good' but received 'unknown'

Errors

Error: Aborting after running 10000 timers, assuming an infinite loop!
Error: Test timed out in 10000ms.
AssertionError: expected 'unknown' to be 'good'

Solution

  • Fix timer mocking in telemetry-sink tests
  • Fix test expectations to match actual behavior
  • Add proper cleanup in afterEach hooks

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions