gitweb: FreedomBox stops responding when running tests
When running gitweb functional tests on a testing container, I noticed that the tests got stuck. Investigating further, I found that plinth was not accessible. The browser shows "Unable to connect", so it seems apache is not responding to to the connection request. Restarting plinth is not enough to bring it back up, although it seems to recover after some time. This issue only happens randomly when running the tests, not every time.
plinth/modules/gitweb/tests/test_functional.py::TestGitwebApp::test_enable_disable PASSED [ 9%]
plinth/modules/gitweb/tests/test_functional.py::TestGitwebApp::test_run_diagnostics PASSED [ 18%]
plinth/modules/gitweb/tests/test_functional.py::TestGitwebApp::test_uninstall PASSED [ 27%]
plinth/modules/gitweb/tests/test_functional.py::TestGitwebApp::test_all_repos_private PASSED [ 36%]
plinth/modules/gitweb/tests/test_functional.py::TestGitwebApp::test_backup_restore PASSED [ 45%]
plinth/modules/gitweb/tests/test_functional.py::TestGitwebApp::test_create_delete_repo[Test-repo-public] PASSED [ 54%]
plinth/modules/gitweb/tests/test_functional.py::TestGitwebApp::test_create_delete_repo[Test-repo-private] PASSED [ 63%]
plinth/modules/gitweb/tests/test_functional.py::TestGitwebApp::test_create_delete_repo[Test-repo.git-public] FAILED [ 72%]
plinth/modules/gitweb/tests/test_functional.py::TestGitwebApp::test_create_delete_repo[Test-repo.git-public] ERROR [ 72%]
plinth/modules/gitweb/tests/test_functional.py::TestGitwebApp::test_create_delete_repo[Test-repo.git-private] ERROR [ 81%]
plinth/modules/gitweb/tests/test_functional.py::TestGitwebApp::test_both_private_and_public_repo_exist ERROR [ 90%]
plinth/modules/gitweb/tests/test_functional.py::TestGitwebApp::test_edit_repo_metadata ERROR [100%]
==================================== ERRORS ====================================
_ ERROR at teardown of TestGitwebApp.test_create_delete_repo[Test-repo.git-public] _
self = <plinth.modules.gitweb.tests.test_functional.TestGitwebApp object at 0x7f7e2b71a290>
session_browser = <splinter.driver.webdriver.firefox.WebDriver object at 0x7f7e2b59c3d0>
@pytest.fixture(autouse=True)
def fixture_background(self, session_browser):
"""Login, install, and enable the app."""
login(session_browser)
install(session_browser, self.app_name)
app_enable(session_browser, self.app_name)
yield
> login(session_browser)
plinth/tests/functional/__init__.py:668:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
plinth/tests/functional/__init__.py:262: in login
login_with_account(browser, base_url, config['DEFAULT']['username'],
plinth/tests/functional/__init__.py:271: in login_with_account
if '/plinth/' not in browser.url or '/jsxc/jsxc' in browser.url:
../../../.local/lib/python3.11/site-packages/splinter/driver/webdriver/__init__.py:307: in url
return self.driver.current_url
../../../.local/lib/python3.11/site-packages/selenium/webdriver/remote/webdriver.py:920: in current_url
return self.execute(Command.GET_CURRENT_URL)['value']
../../../.local/lib/python3.11/site-packages/pytest_splinter/webdriver_patches.py:29: in execute
result = self._base_execute(driver_command, params)
../../../.local/lib/python3.11/site-packages/selenium/webdriver/remote/webdriver.py:430: in execute
self.error_handler.check_response(response)