Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
S slapos.core
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Labels
    • Labels
  • Merge requests 26
    • Merge requests 26
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Environments
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value Stream
  • Members
    • Members
  • Activity
  • Graph
  • Jobs
  • Commits
Collapse sidebar
  • nexedi
  • slapos.core
  • Merge requests
  • !82

Merged
Created Dec 26, 2018 by Jérome Perrin@jeromeOwner

tests/slapgrid: make test more deterministic

  • Overview 3
  • Commits 1
  • Changes 1

test_one_failing_daemon_in_service_will_bang_with_watchdog often fail with:

======================================================================
FAIL: test_one_failing_daemon_in_service_will_bang_with_watchdog (slapos.tests.slapgrid.TestSlapgridCPWithMasterWatchdog)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/srv/slapgrid/slappart9/srv/testnode/bpy/inst/test0-0/parts/slapos.core/slapos/tests/slapgrid.py", line 907, in test_one_failing_daemon_in_service_will_bang_with_watchdog
    'etc', 'software_release', 'worked', '.slapos-retention-lock-delay'])
  File "/srv/slapgrid/slappart9/srv/testnode/bpy/soft/5082e1741ad09c0910ec59bf9feae300/eggs/six-1.11.0-py2.7.egg/six.py", line 673, in assertCountEqual
    return getattr(self, _assertCountEqual)(*args, **kwargs)
AssertionError: Element counts were not equal:
First has 1, Second has 0:  'crashed'
First has 1, Second has 0:  'launched'

This test uses a service that will create files launched and crashed files when running, and just after telling supervisor to start the service test inspects the directory content. If service had time to start, then files are created, otherwise they are not.

Change the service to wait for a delay before creating the files to reduce the change of race condition here.

Assignee
Assign to
Reviewer
Request review from
None
Milestone
None
Assign milestone
Time tracking
Source branch: fix/watchdog-flaky-test
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7