Flaky test in langgraph integration: should set upserted_at on checkpoint and write documents

XMLWordPrintableJSON

    • Type: Build Failure
    • Resolution: Unresolved
    • Priority: Unknown
    • None
    • Affects Version/s: None
    • Component/s: AI/ML
    • Not Needed
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      In the langgraph checkpoint test we compare

      expect(cpDoc!.upserted_at.getTime()).toBeGreaterThanOrEqual(
        before.getTime()
      );
      

      But on fast machine (we normally run these tests locally) this is not always true and the difference in 1-2ms makes this test fail. Easiest solution would be to add some tolerance (i.e. "within 10ms").

      https://github.com/langchain-ai/langgraphjs/blob/main/libs/checkpoint-mongodb/src/tests/checkpoints.int.test.ts#L189-L191

            Assignee:
            Unassigned
            Reporter:
            Sergey Zelenov
            None
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: