This PR fixes the failing test "env selection works" (in ./cypress/integration/basic.js) for the polling-option of visdom (i.e. using the argument -use_frontend_client_polling).
Reason for the error was simply that upon initialization of the client (i.e. when opening http://localhost:8097), two calls to query the initial env main are implicitly sent.
The failed test then proceeded to check if un-selecting and re-selecting the env works correctly.
The error appeared because the polling variant which is slower than the websocket variant, has responded with the second of the two initial queries when the test already cleared the selection box and thus expected the selection to be empty.
Note that the error appears only if the polling is too slow in its initial setup, thus, the error had appeared only somewhat randomly.
This can be easily solved, by letting the test wait until the page loaded correctly (~1sec).
Motivation and Context
See #917 and #918, where the error appeared.
How Has This Been Tested?
10-fold consistency using github actions.
Screenshots (if appropriate):
Types of changes
[x] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
[ ] Code refactor or cleanup (changes to existing code for improved readability or performance)
Checklist:
[ ] I adapted the version number under py/visdom/VERSION according to Semantic Versioning
[x] My code follows the code style of this project.
[ ] My change requires a change to the documentation.
Description
This PR fixes the failing test "env selection works" (in
./cypress/integration/basic.js
) for the polling-option of visdom (i.e. using the argument-use_frontend_client_polling
).Reason for the error was simply that upon initialization of the client (i.e. when opening
http://localhost:8097
), two calls to query the initial envmain
are implicitly sent. The failed test then proceeded to check if un-selecting and re-selecting the env works correctly. The error appeared because the polling variant which is slower than the websocket variant, has responded with the second of the two initial queries when the test already cleared the selection box and thus expected the selection to be empty.Note that the error appears only if the polling is too slow in its initial setup, thus, the error had appeared only somewhat randomly.
This can be easily solved, by letting the test wait until the page loaded correctly (~1sec).
Motivation and Context
See #917 and #918, where the error appeared.
How Has This Been Tested?
10-fold consistency using github actions.
Screenshots (if appropriate):
Types of changes
Checklist:
py/visdom/VERSION
according to Semantic Versioning