Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Register
  • Sign in
  • erp5 erp5
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Merge requests 142
    • Merge requests 142
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Jobs
  • Commits
Collapse sidebar
  • nexedinexedi
  • erp5erp5
  • Merge requests
  • !1552

erp5_core_test: Make testWorkflowHistoryList.TestDedup stable.

  • Review changes

  • Download
  • Patches
  • Plain diff
Merged Vincent Pelletier requested to merge vpelletier/erp5:stabilise_TestDedup into master Feb 09, 2022
  • Overview 2
  • Commits 1
  • Pipelines 0
  • Changes 1

The precise number of entries in a bucket depend on an estimation of the size of a pickle. The pickled data contains DateTime objects, making an equality test brittle:

  • DateTime's timezones are stored as strings (ex: 'GMT') whose length depend on Zope's timezone, which is variable
  • DateTime's time is stored as a floating-point value represented as a string whose length depends on the number of units and decimals are necessary to represent its value, both being variable (one based on when the test was run, the other based on clock precision and exact test execution timing)

Instead, restore the originally-considered-acceptable boundary (24) and verify that the generated value is greater or equal to it. If 24 is considered too small to be acceptable, then it is a decision independent from the present change.

EDIT: some references:

  • 9612e94d
  • discussion on !1378 about this test (where the original value was replaced)

/cc @jerome @jm @arnau

Edited Feb 09, 2022 by Vincent Pelletier
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: stabilise_TestDedup
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7