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

ci: intermittent test failures in the integration tests jobs #897

Open
consideRatio opened this issue May 18, 2023 · 0 comments
Open

ci: intermittent test failures in the integration tests jobs #897

consideRatio opened this issue May 18, 2023 · 0 comments

Comments

@consideRatio
Copy link
Member

Reported by @minrk in #861 (comment).

I guess without looking into it that this fixture could be to blame, because it is reloading hub / proxy, but does it ensure they are ready to be used after that?

  1. proxy needs to be restarted and become ready
  2. hub needs to be restarted and become ready
  3. hub needs to configure routes in restarted proxy

Maybe if we ensure 3 is completed first, we reduce intermittent failures?

def preserve_config(request):
"""Fixture to save and restore config around tests"""
# Import TLJH only when needed. This lets us run tests in places
# where TLJH is not installed - particularly, the 'distro check' test.
from tljh.config import CONFIG_FILE, reload_component
if os.path.exists(CONFIG_FILE):
with open(CONFIG_FILE) as f:
save_config = f.read()
else:
save_config = None
try:
yield
finally:
if save_config:
with open(CONFIG_FILE, "w") as f:
f.write(save_config)
elif os.path.exists(CONFIG_FILE):
os.remove(CONFIG_FILE)
reload_component("hub")
reload_component("proxy")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant