random failure in octavia.tests.unit.cmd.test_prometheus_proxy.TestPrometheusProxyCMD.test_main

Bug #2039245 reported by Gregory Thiemonge
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
octavia
Fix Released
Undecided
Unassigned

Bug Description

reported by the RDO project on stable/yoga (a59d75ce):

https://trunk.rdoproject.org/centos9-yoga/component/octavia/a5/9d/a59d75cea7fae6f8750741544a1b94b5187ed653_70922990/rpmbuild.log

octavia.tests.unit.cmd.test_prometheus_proxy.TestPrometheusProxyCMD.test_main fails randomly

DEBUG: ==============================
DEBUG: Failed 1 tests - output below:
DEBUG: ==============================
DEBUG: octavia.tests.unit.cmd.test_prometheus_proxy.TestPrometheusProxyCMD.test_main
DEBUG: -----------------------------------------------------------------------------
DEBUG: Captured traceback:
DEBUG: ~~~~~~~~~~~~~~~~~~~
DEBUG: Traceback (most recent call last):
DEBUG: File "/usr/lib64/python3.9/unittest/mock.py", line 1336, in patched
DEBUG: return func(*newargs, **newkeywargs)
DEBUG: File "/builddir/build/BUILD/octavia-10.1.1.dev6/octavia/tests/unit/cmd/test_prometheus_proxy.py", line 169, in test_main
DEBUG: mock_serve_forever.assert_called_once()
DEBUG: File "/usr/lib64/python3.9/unittest/mock.py", line 886, in assert_called_once
DEBUG: raise AssertionError(msg)
DEBUG: AssertionError: Expected 'serve_forever' to have been called once. Called 0 times.

Revision history for this message
Michael Johnson (johnsom) wrote :

This code is gone in newer versions because python 3.8 had the newer approach available.
I'm guessing that something is using the port in this test environment, causing the test failure.

Revision history for this message
Alfredo Moralejo (amoralej) wrote :
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to octavia (master)

Fix proposed to branch: master
Review: https://review.opendev.org/c/openstack/octavia/+/917996

Changed in octavia:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to octavia (master)

Reviewed: https://review.opendev.org/c/openstack/octavia/+/917996
Committed: https://opendev.org/openstack/octavia/commit/08fca664235b9508d7a5d7c555161503857e6d1e
Submitter: "Zuul (22348)"
Branch: master

commit 08fca664235b9508d7a5d7c555161503857e6d1e
Author: Gregory Thiemonge <email address hidden>
Date: Thu May 2 19:06:58 2024 +0200

    Fix test_prometheus_proxy.test_main

    test_main may have randomly failed when running multiple tests in
    parallel because ThreadingHTTPServer was not mocked, so a server was
    created, this commit fixes this issue, the server is no longer
    instantiated and is now mocked.

    Change-Id: I2415aafaebd340e4a07b85df2c8917244266ed4c
    Closes-Bug: #2039245

Changed in octavia:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/octavia 15.0.0.0rc1

This issue was fixed in the openstack/octavia 15.0.0.0rc1 release candidate.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to octavia (stable/2024.1)

Fix proposed to branch: stable/2024.1
Review: https://review.opendev.org/c/openstack/octavia/+/935160

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to octavia (stable/2023.2)

Fix proposed to branch: stable/2023.2
Review: https://review.opendev.org/c/openstack/octavia/+/935161

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.