Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FIX] base: test profiling #163016

Closed
wants to merge 1 commit into from
Closed

Conversation

Xavier-Do
Copy link
Contributor

This test can sometimes fail randomly

    FAIL: TestProfiling.test_sync_recorder
    Traceback (most recent call last):
    File "/data/build/odoo/odoo/addons/base/tests/test_profiler.py", line 440, in test_sync_recorder
        self.assertEqual(stacks_methods, [
    AssertionError: Lists differ: [['a'[114 chars]], ['__exit__', '_remove'], ['__exit__'], ['__exit__', 'stop']] != [['a'[114 chars]], ['__exit__', 'stop']]

    First differing element 11:
    ['__exit__', '_remove']
    ['__exit__', 'stop']

    First list contains 2 additional elements.
    First extra element 12:
    ['__exit__']

    [['a'],
    ['a', 'b'],
    ['a'],
    ['a', 'c'],
    ['a', 'c', 'd'],
    ['a', 'c'],
    ['a', 'c', 'd'],
    ['a', 'c'],
    ['a'],
    [],
    ['__exit__'],
    -  ['__exit__', '_remove'],
    -  ['__exit__'],
    ['__exit__', 'stop']]

Since we don't care about the last lines, just remove them from the assertion.

This test can sometimes fail randomly

    FAIL: TestProfiling.test_sync_recorder
    Traceback (most recent call last):
    File "/data/build/odoo/odoo/addons/base/tests/test_profiler.py", line 440, in test_sync_recorder
        self.assertEqual(stacks_methods, [
    AssertionError: Lists differ: [['a'[114 chars]], ['__exit__', '_remove'], ['__exit__'], ['__exit__', 'stop']] != [['a'[114 chars]], ['__exit__', 'stop']]

    First differing element 11:
    ['__exit__', '_remove']
    ['__exit__', 'stop']

    First list contains 2 additional elements.
    First extra element 12:
    ['__exit__']

    [['a'],
    ['a', 'b'],
    ['a'],
    ['a', 'c'],
    ['a', 'c', 'd'],
    ['a', 'c'],
    ['a', 'c', 'd'],
    ['a', 'c'],
    ['a'],
    [],
    ['__exit__'],
    -  ['__exit__', '_remove'],
    -  ['__exit__'],
    ['__exit__', 'stop']]

Since we don't care about the last lines, just remove them from the
assertion.
@robodoo
Copy link
Contributor

robodoo commented Apr 23, 2024

Pull request status dashboard.

@C3POdoo C3POdoo requested review from a team, xmo-odoo and rco-odoo and removed request for a team April 23, 2024 14:55
@C3POdoo C3POdoo added the RD research & development, internal work label Apr 23, 2024
@Xavier-Do
Copy link
Contributor Author

@robodoo r+

@robodoo robodoo closed this in 4eaea4c Apr 23, 2024
willylohws pushed a commit to willylohws/odoo that referenced this pull request May 1, 2024
This test can sometimes fail randomly

    FAIL: TestProfiling.test_sync_recorder
    Traceback (most recent call last):
    File "/data/build/odoo/odoo/addons/base/tests/test_profiler.py", line 440, in test_sync_recorder
        self.assertEqual(stacks_methods, [
    AssertionError: Lists differ: [['a'[114 chars]], ['__exit__', '_remove'], ['__exit__'], ['__exit__', 'stop']] != [['a'[114 chars]], ['__exit__', 'stop']]

    First differing element 11:
    ['__exit__', '_remove']
    ['__exit__', 'stop']

    First list contains 2 additional elements.
    First extra element 12:
    ['__exit__']

    [['a'],
    ['a', 'b'],
    ['a'],
    ['a', 'c'],
    ['a', 'c', 'd'],
    ['a', 'c'],
    ['a', 'c', 'd'],
    ['a', 'c'],
    ['a'],
    [],
    ['__exit__'],
    -  ['__exit__', '_remove'],
    -  ['__exit__'],
    ['__exit__', 'stop']]

Since we don't care about the last lines, just remove them from the
assertion.

closes odoo#163016

Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
@fw-bot fw-bot deleted the 17.0-profiler-test-xdo branch May 7, 2024 18:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
RD research & development, internal work
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants