Closed
Description
The tiktoken test is failing in CI due to timing assertions that cannot be reliably tested in a CI environment.
expect(received).toBeLessThanOrEqual(expected)
Expected: <= 0.3159959999975399
Received: 10.159213999999338
Timing-based tests are inherently flaky in CI environments due to varying system load, resources, and other factors outside our control.
The specific test failing is in src/utils/__tests__/tiktoken.test.ts
line 140:
expect(duration2).toBeLessThanOrEqual(duration1 * 1.5)
@cte This test was recently added and is causing false positives in unrelated pull requests. What could be done to handle timing assertions in CI environments?