Fixed a possible timing error in the tests.

master
Pacman Ghost 3 years ago
parent 3a8385023b
commit c56438d958
  1. 6
      vasl_templates/webapp/config/site.cfg.example
  2. 7
      vasl_templates/webapp/tests/test_vassal.py

@ -2,11 +2,11 @@
; configure VASSAL and VASL
VASSAL_DIR = ...configure the VASSAL installation directory...
VASL_MOD = ...configure the VASL module (e.g. vasl-6.5.0.vmod)...
VASL_EXTNS_DIR = ...configured the VASL extensions directory...
VASL_MOD = ...configure the VASL module (e.g. vasl-6.6.2.vmod)...
VASL_EXTNS_DIR = ...configure the VASL extensions directory...
BOARDS_DIR = ...configure the VASL boards directory...
; configure support params
; configure support programs
; JAVA_PATH = ...configure the Java executable here (optional, must be in the PATH otherwise)...
WEBDRIVER_PATH = ...configure either geckodriver or chromedriver here...

@ -793,7 +793,12 @@ def _update_vsav( fname, expected ):
select_menu_option( "update_vsav" )
# wait for the front-end to receive the data
wait_for( 2, lambda: get_stored_msg( "_vsav-persistence_" ) == "" )
def check_response():
# NOTE: If something is misconfigured, the error response can get stored in the persistence buffer
# really quickly i.e. before we get a chance to detect it here being cleared first.
resp = get_stored_msg( "_vsav-persistence_" )
return resp == "" or resp.startswith( "ERROR:" )
wait_for( 2, check_response )
# wait for the updated data to come back
timeout = 120 if os.name == "nt" else 60

Loading…
Cancel
Save