diff mbox series

[4/5] test_python_django.py: fix timeout calculation.

Message ID 20231105215221.1602465-4-adam.duskett@amarulasolutions.com
State Accepted
Headers show
Series [1/5] support/testing/infra/emulator.py: add a timeout argument for the login method | expand

Commit Message

Adam Duskett Nov. 5, 2023, 9:52 p.m. UTC
timeout = 35 * self.emulator.timeout_multiplier
[...]
        self.assertRunOk(cmd, timeout=timeout)

Gets re-multiplied by self.emulator.timeout_multiplier in self.emulator.run().
Drop multiplying the timeout by self.emulator.timeout_multiplier to fix this
issue.

Signed-off-by: Adam Duskett <adam.duskett@amarulasolutions.com>
---
 support/testing/tests/package/test_python_django.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Peter Korsgaard Nov. 10, 2023, 11:51 a.m. UTC | #1
>>>>> "Adam" == Adam Duskett <adam.duskett@amarulasolutions.com> writes:

 > timeout = 35 * self.emulator.timeout_multiplier
 > [...]
 >         self.assertRunOk(cmd, timeout=timeout)

 > Gets re-multiplied by self.emulator.timeout_multiplier in self.emulator.run().
 > Drop multiplying the timeout by self.emulator.timeout_multiplier to fix this
 > issue.

 > Signed-off-by: Adam Duskett <adam.duskett@amarulasolutions.com>

Committed to 2023.02.x and 2023.08.x, thanks.
diff mbox series

Patch

diff --git a/support/testing/tests/package/test_python_django.py b/support/testing/tests/package/test_python_django.py
index 0b7d35bb6a..e1ca50f6d8 100644
--- a/support/testing/tests/package/test_python_django.py
+++ b/support/testing/tests/package/test_python_django.py
@@ -6,7 +6,7 @@  class TestPythonDjango(TestPythonPackageBase):
     sample_scripts = ["tests/package/sample_python_django.py"]
 
     def run_sample_scripts(self):
-        timeout = 35 * self.emulator.timeout_multiplier
+        timeout = 35
 
         cmd = "cd /opt && /usr/bin/django-admin startproject testsite"
         self.assertRunOk(cmd, timeout=timeout)