Skip to content

Commit

Permalink
Temp change of port
Browse files Browse the repository at this point in the history
  • Loading branch information
ciioprof0 committed Aug 18, 2024
1 parent 29761c5 commit bc89b47
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions ling508/tests/test_95_e2e_ci.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,13 @@ def init_driver():
def run_flask_app():
"""Start the Flask app in a separate process."""
logging.info("Attempting to start the Flask app...")
app.run(host="0.0.0.0", port=5000, debug=False, use_reloader=False)
app.run(host="0.0.0.0", port=50001, debug=False, use_reloader=False)

def wait_for_flask():
"""Wait until the Flask app is responsive."""
for i in range(30): # Retry 30 times with 1-second intervals
for i in range(60): # Retry 60 times with 1-second intervals
try:
response = requests.get("http://localhost:5000/")
response = requests.get("http://localhost:50001/")
if response.status_code == 200:
logging.info(f"Flask app responded successfully on attempt {i + 1}.")
return True
Expand All @@ -76,7 +76,7 @@ def test_form_submission(init_driver, test_client):
pytest.fail("Flask app did not start within the expected time.")

# Open the form in the browser
driver.get("http://localhost:5000/")
driver.get("http://localhost:50001/")

# Wait for the URI field to be present
uri_field = WebDriverWait(driver, 20).until(
Expand Down

0 comments on commit bc89b47

Please sign in to comment.