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

Integration tests fail if $HOST is set #411

Closed
kwinkunks opened this issue Feb 17, 2023 · 0 comments · Fixed by #416
Closed

Integration tests fail if $HOST is set #411

kwinkunks opened this issue Feb 17, 2023 · 0 comments · Fixed by #416
Assignees
Labels
bug Something isn't working

Comments

@kwinkunks
Copy link
Member

This is about the tests in ``tests/data/spe1_st/tests`.

The environment variable HOST is used by the dash server:

https://github.com/plotly/dash/blob/ae093af869ad6a57292b35a065c8c953bbb90444/dash/dash.py#L1822

However, Selenium expects the server to be localhost, so if HOST is set to something other than localhost or 127.0.0.1 (e.g. to the name of the host machine, which was the case for some testing on Azure) then Selenium will experience a ERR_CONNECTION_REFUSED error:

ERROR    dash.testing.application_runners:application_runners.py:197 expected condition not met within timeout
Traceback (most recent call last):
  File "/prog/komodo/2023.02.b4-py38-rhel7/root/lib/python3.8/site-packages/dash/testing/application_runners.py", line 192, in start
    wait.until(
  File "/prog/komodo/2023.02.b4-py38-rhel7/root/lib/python3.8/site-packages/dash/testing/wait.py", line 26, in until
    raise TestingTimeoutError(msg)
dash.testing.errors.TestingTimeoutError: expected condition not met within timeout
DEBUG    selenium.webdriver.remote.remote_connection:remote_connection.py:361 POST http://localhost:58124/session/467f1131ce40f661833a0c6ebcf3649c/url {"url": "http://localhost:58052"}
DEBUG    urllib3.connectionpool:connectionpool.py:456 http://localhost:58124 "POST /session/467f1131ce40f661833a0c6ebcf3649c/url HTTP/1.1" 500 1054
DEBUG    selenium.webdriver.remote.remote_connection:remote_connection.py:383 Remote response: status=500 | data={"value":{"error":"unknown error","message":"unknown error: net::ERR_CONNECTION_REFUSED

In order to help notice this in the future, it might be a good idea to assert that HOST is not set before running the tests marked spe1. Perhaps this would be best done in tests/data/spe1_st/tests/conftest.py.

Possibly HOST should be unset in ci/jenkins/testkomodo.sh, but for now we're taking care of it in the komodo-releases workflow file, https://github.com/equinor/komodo-releases/blob/main/.github/workflows/base-unit-test.yml

Issue in komodo-releases

@kwinkunks kwinkunks added the bug Something isn't working label Feb 17, 2023
@kwinkunks kwinkunks self-assigned this Feb 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant