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

Task: Improve the functional test to not wait for the new root metadata #688

Open
1 task done
kairoaraujo opened this issue Apr 20, 2024 · 0 comments
Open
1 task done

Comments

@kairoaraujo
Copy link
Member

What is the task about?

In a real world the clients will not wait for a new Root Metadata as they will not know when the update occurs (unless it is an agreement between the client and repository)

Currently, in the functional test (FT) we are waiting to validate the metadata update.

def root_metadata_2_root_is_available(http_request):
# double check if the new version is available in the metadata storage
metadata_base_url = os.getenv("METADATA_BASE_URL") or "http://web:8080"
count = 0
while count < 60:
response = http_request(
"GET",
host=metadata_base_url,
)
if "2.root.json" in response.text:
break
else:
count += 1
time.sleep(0.5)
LOGGER.info("[METADATA UPDATE] Metadata Update available (2.root.json)")
assert count < 60, pytest.rstuf_thread.set()

We should add a number of retries.

This improvement is related to

Parent feature

No response

References

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
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