wms_control tests timing issue

Issue #182 resolved
Reimar Bauer created an issue

It seems that we have a timing problem on openening a new server process and requesting data during tests.

sometimes test_wms_control has some failing tests and sometimes not

Comments (11)

  1. Reimar Bauer reporter

    Currently I have only with this test sometimes a failure.

    test_wms_control.py::Test_VSecWMSControlWidget::test_server_getmap FAILED

      assert mockbox.critical.call_count == 0
    

    E assert 1 == 0 E + where 1 = <MagicMock name='QMessageBox.critical' id='140696549493968'>.call_count E + where <MagicMock name='QMessageBox.critical' id='140696549493968'> = <MagicMock name='QMessageBox' id='140696549507408'>.critical

    mslib/msui/_tests/test_wms_control.py:255: AssertionError

  2. Reimar Bauer reporter

    ~/PycharmProjects/mss/mslib/msui/_tests$ watch /home/user/miniconda2/envs/mssdev/bin/python /opt/pycharm-community-2017.1.3/helpers/pycharm/_jb_pytest_runner.py --target test_wms_control.py::Test_VSecWMSControlWidget.test_server_getmap

  3. Reimar Bauer reporter

    Seems we have no description of mss.performance.cfg

    E       assert 1 == 0
    E        +  where 1 = <MagicMock name='QMessageBox.critical' id='139806823631952'>.call_count
    E        +    where <MagicMock name='QMessageBox.critical' id='139806823631952'> = <MagicMock name='QMessageBox' id='139806825010640'>.critical
    
    mslib/msui/_tests/test_wms_control.py:255: AssertionError
    ---------------------------- Captured stdout setup -----------------------------
    serving on http://127.0.0.1:8082
    ---------------------------- Captured stderr setup -----------------------------
    ERROR:root:MapPrefetcher Exception <class 'requests.exceptions.ConnectionError'> - ('Connection aborted.', BadStatusLine("''",)).
    ERROR:root:ERROR: <class 'requests.exceptions.ConnectionError'> ('Connection aborted.', BadStatusLine("''",))
    WARNING:root:Problems reloading stored performance settings (<type 'exceptions.IOError'>: [Errno 2] Datei oder Verzeichnis nicht gefunden: '/tmp/mssc1ffd3402920fff59013b25f6eb44dc5ddaa806d/mss.performance.cfg'). Switching to default
    ----------------------------- Captured stderr call -----------------------------
    ERROR:root:cannot load capabilities document.
    no layers can be used in this view.
    
  4. Joern Ungermann

    The .cfg files are actually pickle's (which we might rename) that are automatically generated to store user settings. As such they do not need to be documented...?

  5. Joern Ungermann

    Some of the errors of get_map might also have been caused by the broken caching that was fixed in the last PR of mine. There still is a random/timing problem, but for a couple of days it was consistently failing.

  6. Log in to comment